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(foo = 1:4, bar = 0.6, baz = “hello”)
> name <- “foo”
> x$name

What will be the output of the following R code?
> x < - list(foo = 1:4, bar = 0.6, baz = "hello")
> name <- "foo"
> x$name
a) 1
b) 2
c) 3
d) NULL

Answer: d
Explanation: Element “name” doesn’t exist.

Join The Discussion