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. What is the data type of vector $a$ if a <- c(1, “m”, FALSE)

 
 
 
 

2. 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")
}

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

16. All columns in a matrix must have the

 
 
 
 

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

 
 
 
 

18. In R, object name cannot start with

 
 
 
 

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

 
 
 
 

20. What will be the output of the following code
X <- factor(c("m", "m", "m", "f", "m", "f", "f")
table(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