Looking For Anything Specific?

Random Questions & Answers on R || Article - 5

Statistical Knowledge | Random Questions & Answers on R | Article - 5

Hello Friends, Welcome to the fifth article of series named Random Questions & Answers on R. The main motto of this series of articles is to provide Questions and their Answers related to R-software that you must know if you are a student of Statistics and want to work or already working on R. These articles will also help you if you are preparing for any corporate sector interview where R is mandatory.  So, without wasting the time, Just dive into this article and learn the following 10 Qusetions from here 😊

Q.1. Can we use base package in R to create a linear regression model ?

Ans : Yes, we can use lm( ) function of base package in R to create a linear regression model.


Q.2. What argument is used to give graph title in plot ( ) function of base package of R  ?

Ans : main is is used to give graph title in plot ( ) function of base package of R.


Q.3. How to install multiple packages in R ?

Ans : By running command install.packages (c("package_name_1","package_name_2"))


Q.4. What will be the output of R code : x = c(2, 4, 7) ; print(x^2);

Ans : 4  16  49


Q.5. What will be the output of R code : x = seq(from = 2, to = 4, by = 1) ; print(x);

Ans : 2  3  4


Q.6. How to list all available datasets in your R ?

Ans : By running command data(package = .packages(all.available = TRUE)) in R.


Q.7. How to calculate logarithm with any specified base of a number in R ?

Ans : Logarithm with specified base of a number is calculated in R by using log ( ) function.


Q.8. How to determine data type of vector x = c(2, 5, "1", 6, 7) in R ?

Ans : Data type of a vector is determined in R by using typeof ( ) function.


Q.9. What will be the output of following R code : x = c(-1, 2, -3, 3, -8) ; print(abs(x) + 1)

Ans : 2  3  4  4  9


Q.10. How to import a dataset in R using CSV file ?

Ans : CSV file is imported in R by using read.csv ( ) function.


So, That's all about 10 questions on R in this article. In next article we'll learn 10 more questions on R-Software. Till then, Good Bye !

Happy Learning ! ðŸ˜Š

If you find any mistake or have any suggestions,  just let me know using Suggestion Form given below (for mobile users) or in sidebar (for laptop users)Thank you in Advance ! ðŸ˜Š

Next Article : Link

Share this Article Via

Post a Comment

0 Comments