Re: [R] Convert date/time string to date

2009-01-11 Thread Gabor Grothendieck
If the file represents a time series then you might want to look at the zoo package. See read.zoo, in particular and ?strptime and R News 4/1 for the % codes and other date/time info. Also ?lag.zoo On Sun, Jan 11, 2009 at 12:22 AM, Heston Capital wrote: > I am new to R and am trying to import a

Re: [R] Convert date/time string to date

2009-01-11 Thread Prof Brian Ripley
On Sun, 11 Jan 2009, Heston Capital wrote: I am new to R and am trying to import a text file that contains date/time and various fields. I want to sort this matrix by date and also perform calculations on the date field (difference between two dates etc). The format of the string looks as foll

[R] Convert date/time string to date

2009-01-10 Thread Heston Capital
I am new to R and am trying to import a text file that contains date/time and various fields. I want to sort this matrix by date and also perform calculations on the date field (difference between two dates etc). The format of the string looks as follows: x<-c("25/2/2003 0:00:00") I tried: as.