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 < – as.Date(“1970-01-01”)
> x

What will be the output of the following R code?
> x < - as.Date("1970-01-01")
> x
a) “1970-01-01”
b) “1970-01-02”
c) “1970-02-01”
d) “1970-02-02”

Answer: a
Explanation: Dates are represented by the Date class and can be coerced from a character string using the as.Date() function.

Join The Discussion