Prof Brian Ripley wrote:
A Date object is not a vector. In released versions of R, data.frame() only knows how to replicate vectors and factors.
That's a rather oblique way of saying that it actually does work with the unreleased version:
> head(transform(airquality,Date=as.Date("1950-01-01"))) Ozone Solar.R Wind Temp Month Day Date 1 41 190 7.4 67 5 1 1950-01-01 2 36 118 8.0 72 5 2 1950-01-01 3 12 149 12.6 74 5 3 1950-01-01 4 18 313 11.5 62 5 4 1950-01-01 5 NA NA 14.3 56 5 5 1950-01-01 6 28 NA 14.9 66 5 6 1950-01-01 > R.version.string [1] "R version 2.9.0 Under development (unstable) (2008-12-23 r47310)" -- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalga...@biostat.ku.dk) FAX: (+45) 35327907 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.