R interview questions part 29

R interview questions part 29

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

Total Questions: 20

1. What is NaN called?

Correct Answer is : Not a Number

2. How can we define ‘infinity’ in R language?

Correct Answer is : Inf

3. How can we define ‘infinity’ in R language?

Correct Answer is : Inf

4. What is the output of the following code? y <- c(TRUE, 2)

Correct Answer is : [1] 1 2

5. What is the output of the following code? y <- c(TRUE, 2)

Correct Answer is : [1] 1 2

6. What is the class defined by the following code? y<-c(2,”t”)

Correct Answer is : Character

7. What is the class defined by the following code? y<-c(2,”t”)

Correct Answer is : Character

8. What is the class defined in the following code? y<-c(FALSE,2)

Correct Answer is : Numeric

9. Which one of the following is not a basic datatype?

Correct Answer is : Data frame

10. How do you create an integer suppose 5 in R?

Correct Answer is : 5L

11. What is the output of the following code? x<- c (“a”,” b”) as.numeric(x)

Correct Answer is : [1] NA NA (Warning message: NAs introduced by coercion)

12. The dimension attribute is itself an integer vector of length _______

Correct Answer is : 2

13. How could be the matrix constructed by using the following code? m <- matrix(1:6, nrow = 2, ncol = 3)

Correct Answer is : column-wise

14. Matrices can be created by row-binding with the help of the following function.

Correct Answer is : rbind()

15. What is the function used to test objects (returns a logical operator) if they are NA?

Correct Answer is : is.na()

16. What is the function used to test objects (returns a logical operator) if they are NaN?

Correct Answer is : is.nan()

17. What is the function to set column names for a matrix?

Correct Answer is : colnames()

18. ______ let’s you perform SQL queries on your R data frames.

Correct Answer is : plyr

19. ______ splits a data frame and results an array (hence the da). Hopefully you’re getting the idea here.

Correct Answer is : daply

20. ________ makes it incredibly easy to fit time series models like ARIMA, ARMA, AR, Exponential Smoothing, etc.

Correct Answer is : forecast

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon