Message-ID: <21146167.post@talk.nabble.com>
Date: 2008-12-23T15:18:45Z
From: Tom La Bone
Subject: Using transform to add a date column to a dataframe
In-Reply-To: <1230041161.2806.26.camel@desktop.localhost>
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
worked
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.