| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Point out the correct statement :

Correct Answer is : All of the mentioned

2. Point out the wrong statement :

Correct Answer is : vectors provide a convenient way to return the results of a statistical computation

3. What would be the output of the following code ? > x <- vector("list", length = 5) > x

Correct Answer is :

4. Which of the following code snippet will create a vector with NAs in it ?

Correct Answer is : x >- c(1, 2, NA, 10, 3)

5. .What would the following code print ? > x <- c(1, 2, NaN, NA, 4) > is.na(x)

Correct Answer is : FALSE FALSE TRUE TRUE FALSE

6. Point out the wrong statement :

Correct Answer is : is.nan() is used to test objects if they are NA

7. Data frames can be converted to a matrix by calling data._______

Correct Answer is : matrix()

8. What would the following code print ? > x <- data.frame(foo = 1:4, bar = c(T, T, F, F)) > ncol(x)

Correct Answer is : 2

9. Point out the correct statement :

Correct Answer is : All of the mentioned

10. What would be the output of the following code ? > x <- 1:3 > names(x)

Correct Answer is :

11. Which of the following statement changes column name to h and f ?

Correct Answer is : colnames(m) <- c(“h”, “f”)

12. .Which of the following is used for reading tabular data ?

Correct Answer is : read.csv

13. What will be the output of following code snippet ? > lm <- function(x) { x * x } > lm

Correct Answer is : function(x) { x * x }

14. A function, together with an environment, makes up what is called a ______ closure.

Correct Answer is : function

15. Which of the variable in the following code is variable ? > f <- function(x, y) { + x^2 + y / z + }

Correct Answer is : z

16. Point out the wrong statement :

Correct Answer is : The order of the packages on the search list does not matter

17. R uses _________ scoping⁶⁰ or static scoping.

Correct Answer is : lexical

18. The only environment without a parent is the ________ environment.

Correct Answer is : empty

19. The ________ for R are the main feature that make it different from the original S language

Correct Answer is : scoping rules

20. The _________ function is a kind of “constructor function” that can be used to construct other functions.

Correct Answer is : make.power()