Looking For Anything Specific?

Random Questions & Answers on R || Article - 4

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

Hello Friends, Welcome to the fourth 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. How do you assign value to a variable in R ?

Ans : We assign value to a variable in R by using assignment operators less than sign followed by a minus, or a minus sign followed by a greater than sign, or an equal to sign only.


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

Ans : xlab is is used to give X-axis title in plot ( ) function of base package of R.


Q.3. How to check version of installed R in your machine ?

Ans : By running command R.Version ()


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

Ans : 1.0  2.0  3.5


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 mean ( ) function of base package in R ?

Ans : By running command ?mean in R.


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

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


Q.8. How to determine length of numeric vector x = c(2, 5, 1, 6, 7, NA) in R ?

Ans : Length of a numeric vector is determined in R by using length ( ) function.


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

Ans : 1  2  3  3  8


Q.10. How to create a stacked bar diagram in R using base package?

Ans : A stacked bar diagram is created in R by using barplot ( ) 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