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.

Which of the following extracts first four element from the following R vector?
> x < – c(“a”, “b”, “c”, “c”, “d”, “a”)

Which of the following extracts first four element from the following R vector?
> x < - c("a", "b", "c", "c", "d", "a")
a) x[0:4]
b) x[1:4]
c) x[0:3]
d) x[4:3]

Answer: b
Explanation: The multiple successive elements which we want to extract will be in the format of variable[index value of the start element:index value of the last element] in R script.

Join The Discussion