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(1, 2, NA, 4, NA, 5)
> bad < – is.na(x)
> print(bad)

What will be the output of the following R code?
> x < - c(1, 2, NA, 4, NA, 5)
> bad < - is.na(x)
> print(bad)
a) FALSE FALSE FALSE FALSE TRUE FALSE
b) FALSE TRUE TRUE FALSE TRUE FALSE
c) FALSE FALSE TRUE FALSE TRUE FALSE
d) FALSE TRUE TRUE TRUE TRUE FALSE

Answer: c
Explanation: A common task in data analysis is removing missing values (NAs).

Join The Discussion