MCQS
MCQS
Arsham Maqbool
Data Science with R
Select the correct answer to following multiple choice questions.
5) If I execute the expression x <- 4 in R language, what is the class of the object `x as
determined by the `class() function?
a)Numeric b)Integer c)Real d)Complex
8) If I have two vectors x <- c(1,3, 5) and y <- c(3, 2, 10), what is produced by the
expression rbind(x, y)?
a)A vector of b)A 2 by 3 matrix c)A vector of d)A 2 by 2 matrix
length 3 length 2
9) What is the class of the object defined by the expression x <- c(4, "a", TRUE)?
a)Integer b)Character c)Logical d)Numeric
10) Suppose I have a vector x <- 1:4 and y <- 2:3. What is produced by the expression x
+ y?
a) An integer b) A numeric vector c) A numeric vector d) An error
vector with the with the values 3, 5, with the values 1,
values 3, 5, 5, 7. 3, 4. 2, 5, 7.