[R] How to transform the date format as "20050425"

From: Yong Wang <wang_at_galton.uchicago.edu>
Date: Tue 26 Apr 2005 - 06:18:17 EST

Dear R user,
if the dates are in format as "20050425" i.e., Apr. 25 2004" can you suggest an easy way to transfom it to standard form as "2005-04-25" or "2004Apr25" or "2005/04/25" or any other format which is R recognizable?
if there is no easy way to do that, can you let me know what is the function in R performing similiar function as the "string" function in C or some other more basic language, so I can loop through all dates to make the desired change.
thank you
regards



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Apr 26 06:23:43 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:26 EST