R Programming Quiz Questions and Answers 18

This post is about “R Programming Quiz Questions and Answers”. There are 20 multiple-choice type 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 and Answers.

Online Multiple Choice Questions about R Programming Language

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

 
 
 
 

2. All columns in a matrix must have the

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

7. In R, object name cannot start with

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

R FAQS R Programming Quiz Questions and Answers

R Programming Quiz Questions and 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 Language Frequently Asked Questions

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

Continue reading