R Programming Quiz Questions Answers 18

This post is about “R Programming Quiz Questions Answers”. There are 20 multiple-choice questions from R programming covering topics related to the output of different R commands, R console, matrices, data frames, factors, vectors, R objects, and different operations on R objects. Let us start with R Programming Quiz Questions Answers.

Online Multiple Choice Questions about R Programming Language

1. R console is a tool that is used to write (insert) standard

 
 
 
 

2. The output of seq(10, 1, -2) is

 
 
 
 

3. In R, object name cannot start with

 
 
 
 

4. The multiplication of two matrices $A$ and $B$ can be performed in R using the operator

 
 
 
 

5. The following command will find the 60th percentile for the variable $disp$

 
 
 
 

6. Which command will create a matrix of the first 9 numbers in 3 rows and 3 columns?

 
 
 
 

7. The output of the seq(1, 10, 2) is

 
 
 
 

8. The Vectors, data frames, or matrices containing decimal values can be converted to integers using

 
 
 
 

9. What would be the output of 1:5 + 5:1.

 
 
 
 

10. All columns in a matrix must have the

 
 
 
 

11. What is the data type of vector $a$ if a <- c(1, “m”, FALSE)

 
 
 
 

12. To perform one-way Analysis of variance, one can use function

 
 
 
 

13. What will be the output of the following code
X <- factor(c("m", "m", "m", "f", "m", "f", "f")
table(X)

 
 
 
 

14. What will be the output of the following
X <- factor(c(“yes”, “yes”, “yes”, “no”, “yes”, “no”, “no”)
table(X)

 
 
 
 

15. Which of the following function can be used to create a vector having repeated values

 
 
 
 

16. When we compare two vectors element by element the resultant outcome is a

 
 
 
 

17. What will be the output of the following lines of code?
x <- 31
if (x %% 2 == 0){
print("X is even")
}else {
print("X is odd")
}

 
 
 
 

18. What would be the output of the following code?
x <- 1:4
y <- 6:9
z <- x + y
print(z)

 
 
 
 

19. What is the output of 1:4 + 4:1

 
 
 
 

20. What will be the output of the following
x <- vector("numeric", length = 10); print(x)

 
 
 
 

R FAQS R Programming Quiz Questions and Answers

R Programming Quiz Questions Answers

  • The output of seq(10, 1, -2) is
  • What will be the output of the following lines of code? x <- 31 if (x %% 2 == 0){ print(“X is even”) }else { print(“X is odd”) }
  • What would be the output of 1:5 + 5:1.
  • What will be the output of the following x <- vector(“numeric”, length = 10); print(x)
  • What would be the output of the following code? x <- 1:4 y <- 6:9 z <- x + y print(z)
  • What will be the output of the following X <- factor(c(“yes”, “yes”, “yes”, “no”, “yes”, “no”, “no”) table(X)
  • The output of the seq(1, 10, 2) is
  • What will be the output of the following code X <- factor(c(“m”, “m”, “m”, “f”, “m”, “f”, “f”) table(X)
  • What is the output of 1:4 + 4:1
  • R console is a tool that is used to write (insert) standard
  • The following command will find the 60th percentile for the variable $disp$
  • The multiplication of two matrices $A$ and $B$ can be performed in R using the operator
  • Which command will create a matrix of the first 9 numbers in 3 rows and 3 columns?
  • When we compare two vectors element by element the resultant outcome is a
  • Which of the following function can be used to create a vector having repeated values
  • The Vectors, data frames, or matrices containing decimal values can be converted to integers using
  • What is the data type of vector $a$ if a <- c(1, “m”, FALSE)
  • All columns in a matrix must have the
  • To perform one-way Analysis of variance, one can use function
  • In R, object name cannot start with
R Programming Quiz Questions and Answers

https://itfeature.com, https://gmstat.com

Leave a Reply

Discover more from R Programming FAQs

Subscribe now to keep reading and get access to the full archive.

Continue reading