| 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. which of the following statement gives cumulative sum ?

Correct Answer is : cumsum(x,na=rm=TRUE)

2. Which of the following is uniform distribution ?

Correct Answer is : dunif(x, min=0, max=1, log = FALSE)

3. Which of the following truncates real x to integers ?

Correct Answer is : as.integer(x)

4. Which of the following tests each element of x for membership in y?

Correct Answer is : x%in%y

5. Which of the following finds the maximum value in the vector x, exclude missing values

Correct Answer is : max(x, na.rm=TRUE)

6. Which of the following produces the variance covariance matrix ?

Correct Answer is : var(x, na.rm=TRUE)

7. Which of the following will reverse the order of values in x ?

Correct Answer is : rev(x)

8. Which of the following finds row sums for each level of a grouping variable ?

Correct Answer is : rowMeans(x, na.rm = FALSE, dims = 1)

9. Which of the following statement applies the function (FUN) to either rows (1) or columns (2) on object X ?

Correct Answer is : apply(X, MARGIN, FUN, …)

10. Which of the following statement finds the maximum for each column ?

Correct Answer is : apply(x,2,max)

11. which of the following statement tells the row with the minimum value for every column ?

Correct Answer is : which.min(x)

12. Which of the following may be used for linear regression ?

Correct Answer is : solve(A,B)

13. Which of the following finds row sums for each level of a grouping variable ?

Correct Answer is : rowsum(x, group, reorder = TRUE, …)

14. Which of the following sets the size of the outer margins for the graph ?

Correct Answer is : par(omi=c(0,0,1,0) )

15. Which of the following function is used for plotting histogram ?

Correct Answer is : hist()

16. Which of the following will add the title “R language” to the graph ?

Correct Answer is : title( “R language”)

17. Individual R objects can be saved to a file using the _____ function.

Correct Answer is : save

18. Point out the correct statement :

Correct Answer is : All of the mentioned

19. Which of the following statement will save the output to the file for following code ? > a <- data.frame(x = rnorm(100), y = runif(100)) > b <- c(3, 4.4, 1 / 3)

Correct Answer is : save(a, b, file = “mydata.rda”)

20. Which of the following statement will load the objects to the file named “mydata.RData” ?

Correct Answer is : load(“mydata.RData”)