Re: [R] 19900501 into 1990-05-01

2009-11-05 Thread jim holtman
If you just want it to remain as character data: > sub("()(..)(..)", "\\1 \\2 \\3", "19000501") [1] "1900 05 01" > On Thu, Nov 5, 2009 at 2:04 PM, frenchcr wrote: > > I have a column of dates in this format.. 19900501 > > I want to change > 19900501 into 1990 05 01 > then append a new colum

Re: [R] 19900501 into 1990-05-01

2009-11-05 Thread Remko Duursma
Something like: format(as.Date("20090501",format="%Y%m%d"), "%Y %m %d") r - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macq

[R] 19900501 into 1990-05-01

2009-11-05 Thread frenchcr
I have a column of dates in this format.. 19900501 I want to change 19900501 into 1990 05 01 then append a new column on the end (right hand side of spreadsheet) :confused: -- View this message in context: http://old.nabble.com/19900501-into-1990-05-01-tp26217515p26217515.html Sent from the R