[R] convert date to a factor

2012-07-20 Thread Yolande Tra
Hello, I would like to convert date as a factor to represent time in a repeated measure situation in the following code. How would I do that? d - read.csv(file.path(dataDir,data.csv), as.is=T,stringsAsFactors = FALSE) d[1:2,] id date ab c y 1 1

Re: [R] convert date to a factor

2012-07-20 Thread R. Michael Weylandt
d$date - factor(d$date) Best, Michael On Fri, Jul 20, 2012 at 9:44 AM, Yolande Tra yolande@gmail.com wrote: Hello, I would like to convert date as a factor to represent time in a repeated measure situation in the following code. How would I do that? d -

Re: [R] convert date to a factor

2012-07-20 Thread Yolande Tra
Thanks, Y On Fri, Jul 20, 2012 at 11:47 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote: d$date - factor(d$date) Best, Michael On Fri, Jul 20, 2012 at 9:44 AM, Yolande Tra yolande@gmail.com wrote: Hello, I would like to convert date as a factor to represent time in a

Re: [R] convert date to a factor

2012-07-20 Thread Yolande Tra
:44 AM Subject: [R] convert date to a factor Hello, I would like to convert date as a factor to represent time in a repeated measure situation in the following code. How would I do that? d - read.csv(file.path(dataDir,data.csv), as.is=T,stringsAsFactors = FALSE) d[1:2,] id

Re: [R] convert date to a factor

2012-07-20 Thread arun
22 2  1 8/6/2008 Green 15 B 22  is.factor(dat1$date) [1] TRUE A.K. - Original Message - From: Yolande Tra yolande@gmail.com To: r-help@r-project.org Cc: Sent: Friday, July 20, 2012 10:44 AM Subject: [R] convert date to a factor Hello, I would like to convert date as a factor