[R] Importing time series

Gabor Grothendieck ggrothendieck at gmail.com
Wed Jul 29 10:07:25 CEST 2009


The format for the year should be %Y, not %y; however, without a reproducible
example (see last line to every message on R help) we can't be sure
that that is the whole story.

On Wed, Jul 29, 2009 at 3:00 AM, Bogaso<bogaso.christofer at gmail.com> wrote:
>
> I have a time series dataset, saved in a csv file. However date-formatting is
> :
>
> 7/2/1982
> 7/6/1982
> 7/7/1982
> 7/8/1982
> 7/13/1982
> 7/14/1982
>
> However if I use following zoo-code, it is not reading data:
>
> read.zoo(file="F:/data.csv", format="%m/%d/%y", header=F)
>
> Error is
> Error in read.zoo(file ="F:/data.csv", format = "%m/%d/%y",  :
>  index contains NAs
>
> Here I have the mandate to keep date formating in abovementioned way. Can
> anyone please tell me what to do here?
>
> Regards,
>
> --
> View this message in context: http://www.nabble.com/Importing-time-series-tp24713580p24713580.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org 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.
>




More information about the R-help mailing list