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(3, 7, NA, 4, 7)
y <- c(5, NA, 1, 2, 2)
x + y

What will be the output of the following R code?
x <- c(3, 7, NA, 4, 7)
y <- c(5, NA, 1, 2, 2)
x + y
a) Symbol
b) Missing Data
c) 5
d) 15.5

Answer: b
Explanation: Missing data are a persistent and prevalent problem in many statistical analyses, especially those associated with the social sciences. R reserves the special symbol NA to represent missing data. Ordinary arithmetic with NA value gives NA’s (addition, subtraction, etc.) and applying a function to a vector that has a NA in it will usually give a NA.

Join The Discussion