Hello Friends, Welcome to the sixth 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. What is the function of base package to calculate median of a numeric vector in R ?
Ans : median ( )
Q.2. What is the keyboard shortcut to run a particular line of a program in R ?
Ans : Ctrl + Enter
Q.3. How to attach a dataset in a program in R ?
Ans : By running command attach (dataset_name)
Q.4. What will be the output of R code : x = c(2, 4, 7)/c(3, 5) ; print(x);
Ans : 0.6666667 0.8000000 2.3333333 with a warning message.
Q.5. What will be the output of R code : x = -1:-4 ; print(x);
Ans : -1 -2 -3 -4
Q.6. Tell a method to take help for median ( ) function of base package in R ?
Ans : By running command ?median
Q.7. How to calculate eigen values and eigen vector in R using base package ?
Ans : Using function eigen (matrix_object)
Q.8. How to determine product of known elements of numeric vector x = c(2, 5, 1, 6, 7, NA) in R ?
Ans : By running command prod (x, na.rm = T)
Q.9. What will be the output of following R code : x = c(-1, 2, -3, 3, -8) ; print(prod(x))
Ans : -144
Q.10. Which function of base package is used to create a Logistic Regression model in R ?
Ans : glm ( ) function is used to create a Logistic Regression model object.
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 (Available Soon)
Share this Article Via
0 Comments
Please, Do not enter any spam link in the comment box