Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following R code?
> x < – c(“a”, “b”, “c”, “c”, “d”, “a”)
> x[c(1, 3, 4)]

What will be the output of the following R code?
> x < - c("a", "b", "c", "c", "d", "a")
> x[c(1, 3, 4)]
a) “a” “b” “c”
b) “a” “c” “c”
c) “a” “c” “b”
d) “b” “c” “b”

Answer: b
Explanation: The sequence does not have to be in order; you can specify any arbitrary integer vector.

Join The Discussion