| 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. What will be the output of following code ? > f <- function(num) { + hello <- "Hello, world!\n" + for(i in seq_len(num)) { + cat(hello) + } + chars <- nchar(hello) * num + chars + } > meaningoflife <- f(3) > print(meaningoflife)

Correct Answer is : 32

2. What will be the output of following code snippet ? > paste("a", "b", se = ":")

Correct Answer is : none of the mentioned

3. Point out the correct statement :

Correct Answer is : All of the mentioned

4. The __________ function returns a list of all the formal arguments of a function

Correct Answer is : formals()

5. Point out the wrong statement :

Correct Answer is : A formal argument can be a symbol, a statement of the form ‘symbol = expression’, or the special formal argument

6. You can check to see whether an R object is NULL with the _________ function.

Correct Answer is : is.null()

7. Which of the following code will print NULL ?

Correct Answer is : > args(paste)

8. What will be the output of following code ? > f <- function(a, b) { + a^2 + } > f(2)

Correct Answer is : 4

9. What will be the output of following code snippet ? > paste("a", "b", sep = ":")

Correct Answer is : “a:b”

10. What will be the output of following code ? > f <- function(a, b) { + print(a) + print(b) + } > f(45)

Correct Answer is : 45

11. R Commander is used to ___________ in R.

Correct Answer is : Import data

12. Two vectors M and N are defined as M <- c(3, 2, 4) and N <- c(1, 2). What will be the output of vector Z that is defined as Z <- M*N.

Correct Answer is : Z <- (3, 4, 4)

13. How missing values and impossible values are represented in R language?

Correct Answer is : NA & NAN

14. CRAN package ecosystem has more than ______ packages.

Correct Answer is : 6000

15. Which function in R language is used to find out whether the means of 2 groups are equal to each other or not?

Correct Answer is : t.tests ()

16. How many types of data structures does R language have?

Correct Answer is : 2

17. __________ is the easiest method for reshaping the data before analysis.

Correct Answer is : Transpose()

18. ___________ function is used to apply an expression for a given dataset.

Correct Answer is : With()

19. __________ package is used to speed up data frame management code.

Correct Answer is : Dplyr

20. Which package can be integrated with dplyr for large fast tables?

Correct Answer is : Data.table