James J. Roper escribió:
> Dear all,
>
> I often use dates and times in analyses.  I just can't figure out how to 
> format my date or time column in R.  So, apparently R sees the date as 
> something other than date (character).  Let's say I am opening a CSV 
> file, one of the columns of which is a date or time.  How do I specify 
> that when opening the file?
>
> Thanks for the help,
>
> Jim
>
>   
Jim,

Suppose a matrix F (6575,189) where rows are days and columns some grid 
points:

First we set the starting date of the series (6575 is the total number 
of days):

library(zoo)
x.Date<-as.Date("1987-12-31")+ c(1:6575)
F.zoo <- zoo(F, x.Date)

#then take a look

F.zoo[,1]

HTH

Antonio

______________________________________________
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.

Reply via email to