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 < – list(a = list(10, 12, 14), b = c(3.14, 2.81))
> x[[c(1, 3)]]

What will be the output of the following R code?
> x < - list(a = list(10, 12, 14), b = c(3.14, 2.81))
> x[[c(1, 3)]]
a) 13
b) 14
c) 15
d) 18

Answer: b
Explanation: The [[ operator can take an integer sequence if you want to extract a nested element of a list.

Join The Discussion