[R] column of dates into time series

2009-11-29 Thread DispersionMap
i have a column of dates in this format: data[,Raised.Date] - as.Date(data[,Raised.Date], %d/%m/%Y); data[1:10,Raised.Date] [1] 2006-07-07 2006-07-07 2006-04-03 2006-04-03 2006-04-03 2006-04-03 2006-04-03 2006-04-03 2006-04-03 2006-04-03 I can turn them into months like this...

Re: [R] column of dates into time series

2009-11-29 Thread Linlin Yan
There is no year() function. Maybe you can try format() instead. On Sun, Nov 29, 2009 at 8:44 PM, DispersionMap frenc...@btinternet.com wrote: i have a column of dates in this format: data[,Raised.Date] - as.Date(data[,Raised.Date], %d/%m/%Y); data[1:10,Raised.Date] [1] 2006-07-07

Re: [R] column of dates into time series

2009-11-29 Thread David Winsemius
On Nov 29, 2009, at 7:52 AM, Linlin Yan wrote: There is no year() function. Maybe you can try format() instead. On Sun, Nov 29, 2009 at 8:44 PM, DispersionMap frenc...@btinternet.com wrote: i have a column of dates in this format: data[,Raised.Date] - as.Date(data[,Raised.Date],

Re: [R] column of dates into time series

2009-11-29 Thread DispersionMap
Thanks again David, Heres what happened: Weeks-summary(cut(data$Raised.Date, breaks=weeks)) Weeks 2007-12-17 2009-01-05 2008-06-09 2008-12-08 2009-02-09 2008-12-01 370342333317308298 2008-05-12 2009-02-16 2007-01-22 2008-06-02 2007-01-29

Re: [R] column of dates into time series

2009-11-29 Thread David Winsemius
How about a representation of the data that one could so something with? By that I mean either by the dump method described in the Posting Guide or by using dput: ttt - c(1,2) dput(ttt) c(1, 2) dump(ttt, stdout() ) ttt - c(1, 2) Did you honestly expect anyone in their right mind to

Re: [R] column of dates into time series

2009-11-29 Thread DispersionMap
? like this do you mean... dput(Weeks) structure(c(370L, 342L, 333L, 317L, 308L, 298L, 289L, 269L, 265L, 257L, 254L, 253L, 252L, 249L, 243L, 243L, 239L, 239L, 236L, 234L, 233L, 232L, 230L, 230L, 229L, 229L, 229L, 228L, 227L, 226L, 225L, 222L, 218L, 217L, 216L, 215L, 215L, 214L, 214L, 214L,

Re: [R] column of dates into time series

2009-11-29 Thread David Winsemius
On Nov 29, 2009, at 11:59 AM, DispersionMap wrote: ? like this do you mean... Yes. Exactly. Unfortunately that data was passed though the summary function which has done some odd things to the data, to wit: Weeks[Weeks==189] 2007-03-26 2007-07-09 2007-11-05 2008-02-25 2008-09-08

Re: [R] column of dates into time series

2009-11-29 Thread David Winsemius
On Nov 29, 2009, at 12:41 PM, David Winsemius wrote: On Nov 29, 2009, at 11:59 AM, DispersionMap wrote: ? like this do you mean... Yes. Exactly. Unfortunately that data was passed though the summary function which has done some odd things to the data, to wit: Weeks[Weeks==189]