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 element from the following R list?
> x < – list(foo = 1:4, bar = 0.6)

Which of the following extracts first element from the following R list?
> x < - list(foo = 1:4, bar = 0.6)
a) x[[1]]
b) x[1]
c) x[[0]]
d) x[0]

Answer: a
Explanation: The [[ operator can also use named indices so that you don’t have to remember the exact ordering of every element of the list.

Join The Discussion