R Language MCQs 2

This quiz “MCQs R Language” will help you to check your ability to execute some basic operations on objects in the R language, and it will also help you to understand some basic concepts. This quiz may also improve your computational understanding.

1. The R language is a dialect of which of the following programming languages?

 
 
 
 
 

2. A key property of vectors in R language is that

 
 
 
 

3. Suppose I have a vector x <- 1:4 and y <- 2:3. What is produced by the expression x + y?

 
 
 
 

4. Suppose I have a list defined as x <- list(2, “a”, “b”, TRUE). What does x[[2]] give me?

 
 
 
 

5. What function is used to test the missing observation in data frame

 
 
 
 

6. What is the class of the object defined by the expression x <- c(4, “a”, TRUE)?

 
 
 
 

7. If I have two vectors x <- c(1,3, 5) and y <- c(3, 2, 10), what is produced by the expression rbind(x, y)?

 
 
 
 

8. If I execute the expression x <- 4 in R language, what is the class of the object “x” as determined by the “class()” function?

 
 
 
 

9. The definition of free software consists of four freedoms (freedoms 0 through 3). Which of the following is NOT one of the freedoms that are part of the definition?

 
 
 
 

10. In R language the following are all atomic data types EXCEPT

 
 
 
 

11. Suppose I have a vector x <- c(3, 5, 1, 10, 12, 6) and I want to set all elements of this vector that are less than 6 to be equal to zero. What R code achieves this?

 
 
 
 

12. _________ is function in R to get number of observation in a data frame

 
 
 
 

For More R Quiz, Visit R Language MCQs 1