[R] Date variable

From: stat stat <stat700004_at_yahoo.co.in>
Date: Wed 24 Jan 2007 - 09:46:45 GMT


Dear R users,    

  I did following with a date variable    

  library(date)
  date = "03/11/05"
date = as.Date(date, format="%m/%d/%y")
date
[1] "2005-03-11"

s = vector(length=3)
s[1] = date
s[1]
[1] 12853

  But here I got s[1] as 12853. But this is not that I want. I need s[1] as original date.    

  Can anyone tell me where is the mistake?    

  Thanks and regards,                                  



 Here’s a new way to find what you're looking for - Yahoo! Answers

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed Jan 24 20:53:15 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 24 Jan 2007 - 14:00:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.