[R] Using transform to add a date column to a dataframe
Tom La Bone
booboo at gforcecable.com
Tue Dec 23 16:18:45 CET 2008
Gavin Simpson wrote:
> It says that the two arguments have different numbers of observations.
> The reason for which should now be pretty obvious as you provided a
> single Date whereas airquality has 153 observations.
Thanks. I did look at ?transform but I was a bit confused because this
data1 <- transform(airquality,LTMDA=T)
whereas this did not
data1 <- transform(airquality,Date=as.Date("1950-01-01"))
Why does the first one work with one argument but the second one does not?
View this message in context: http://www.nabble.com/Using-transform-to-add-a-date-column-to-a-dataframe-tp21144414p21146167.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help