JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
R interview questions part 8
R interview questions part 8
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which of the following is used for generating sequences ?
A. seq()
B. sequence()
C. order()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
seq()
2. Which of the following statement would print “0” “1” “2” “3” “4” “5” “6” for the following code ? > x <- 0:6
A. as.character(x)
B. as.logical(x)
C. as.numeric(x)
D. none of the mentioned
Show Correct Answer
Correct Answer is :
as.character(x)
3. Point out the correct statement :
A. rep() is be used for replicating an object in various complicated ways
B. seq() function has four arguments
C. sequence() is a more general facility for generating sequences
D. all of the mentioned
Show Correct Answer
Correct Answer is :
rep() is be used for replicating an object in various complicated ways
4. What would be the result of following code ? x <- c("a", "b", "c") > as.numeric(x)
A. Warning
B. Error
C. Abnormal termination
D. Prints x
Show Correct Answer
Correct Answer is :
Warning
5. What would the following code print ? > x <- c("a", "b", "c") > as.logical(x)
A. a b c
B. NA NA NA
C. 36527
D. None of the mentioned
Show Correct Answer
Correct Answer is :
NA NA NA
6. Point out the correct statement :
A. The elements of a logical vector cannot have the values TRUE, FALSE, and NA
B. Matrices are vectors with a dimension attribute
C. Numerical vectors are generated by conditions
D. All of the mentioned
Show Correct Answer
Correct Answer is :
Matrices are vectors with a dimension attribute
7. What would be the output of the following code ? > m <- matrix(nrow = 2, ncol = 3) > dim(m)
A. 45353
B. 45325
C. 45324
D. None of the mentioned
Show Correct Answer
Correct Answer is :
45325
8. What would the following code print ? > m <- 1:10 > m
A. 1 2 3 4 5 6 7 8 9 10
B. 1 2 3 4 5 6 7 8 9 10 11
C. 0 1 2 3 4 5 6 7 8 9 10
D. None of the mentioned
Show Correct Answer
Correct Answer is :
1 2 3 4 5 6 7 8 9 10
9. Find the following type of vector? a <- c(1,2,5.3,6,-2,4)
A. Numeric
B. Character
C. Integer
D. Logical
Show Correct Answer
Correct Answer is :
Numeric
10. All columns in a matrix must have the same mode and the _________ length.
A. Different
B. Same
C. May be the same
D. May be different
Show Correct Answer
Correct Answer is :
Same
11. ___________ provides optional labels with the columns and rows.
A. Disnames
B. Dimnames
C. Denmes
D. Demnesd
Show Correct Answer
Correct Answer is :
Dimnames
12. ________ are similar to matrices but can have more than two dimensions.
A. Functions
B. Packages
C. Arrays
D. Columns
Show Correct Answer
Correct Answer is :
Arrays
13. Which is more general than a matrix, in that different columns can have different modes?
A. Data types
B. Data frames
C. Data sets
D. Databases
Show Correct Answer
Correct Answer is :
Data sets
14. An ordered collection of objects or components are called ________
A. Data frames
B. Datasets
C. Databases
D. Lists
Show Correct Answer
Correct Answer is :
Lists
15. The ________ stores the nominal values as a vector of integers in the range of 1 to unique values in the nominal variable.
A. Factor
B. Matrix
C. Lists
D. Functions
Show Correct Answer
Correct Answer is :
Factor
16. An ordered factor is used to represent an __________
A. Ordinal variable
B. Simple variable
C. Coordinal variable
D. Biordinal variable
Show Correct Answer
Correct Answer is :
Ordinal variable
17. On what basis of a variable, OS allocates memory and decides what can be stored in the reserved memory?
A. Data bases
B. Data sets
C. Data types
D. Lists
Show Correct Answer
Correct Answer is :
Data types
18. The data type of the R-object becomes the data type of the ________
A. Functions
B. Packages
C. Variables
D. Lists
Show Correct Answer
Correct Answer is :
Variables
19. Which function is used to combine the elements into a vector?
A. C()
B. D()
C. E()
D. F()
Show Correct Answer
Correct Answer is :
C()
20. A __________ is an R-object which can contain many different types of elements inside it.
A. Vector
B. Lists
C. Matrix
D. Functions
Show Correct Answer
Correct Answer is :
Lists
Similar Interview Questions
Search for latest jobs
Find Jobs