RE: [R] Need help on parsing dates

2004-02-25 Thread Gabor Grothendieck
(EST) From: Gabor Grothendieck [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [R] Need help on parsing dates There are a number of ways to do this. First read in the data using the as.is=1 argument to ensure that the date is read in as character: z

Re: [R] Need help on parsing dates

2004-02-23 Thread Prof Brian Ripley
On Tue, 24 Feb 2004, Ajay Shah wrote: I know this: library(date) x=1979-04-04 try=as.date(x, ymd) print(try) [1] 4Apr79 and that `x' here has to be a string, e.g.: x=1979-04-04 print(x) [1] 1971 I'm stuck in reading from a file. I say: A -

Re: [R] Need help on parsing dates

2004-02-23 Thread Sundar Dorai-Raj
Ajay Shah wrote: I know this: library(date) x=1979-04-04 try=as.date(x, ymd) print(try) [1] 4Apr79 and that `x' here has to be a string, e.g.: x=1979-04-04 print(x) [1] 1971 I'm stuck in reading from a file. I say: A - read.table(file=try) print(A)

Re: [R] Need help on parsing dates

2004-02-23 Thread Don MacQueen
At 1:37 AM +0530 2/24/04, Ajay Shah wrote: I know this: library(date) x=1979-04-04 try=as.date(x, ymd) print(try) [1] 4Apr79 and that `x' here has to be a string, e.g.: x=1979-04-04 print(x) [1] 1971 I'm stuck in reading from a file. I say: A - read.table(file=try)