Skip to content
Prev 8922 / 398502 Next

Reformatting dates using chron

Using the standard formatting tools from chron, you can do e.g.

	format(dts) <- "year month day"

which will give

R> dts
[1] 1998 January 02 1998 January 03 1998 January 04 1998 January 05

etc, but you cannot get a full year immediately followed by a non space
separtor.  You could write a *function* which produces the format you
want ... but as Brian correctly points out, using the new date/time
classes in R 1.2 is much more convenient.

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._