[R] Importing time series

Bogaso bogaso.christofer at gmail.com
Wed Jul 29 10:22:15 CEST 2009


Thanks for reply. However still problem is there. Here I am giving some parts
of the data :

> ss <- "7/2/1982312.7212.0618.397471390.4
+ 7/6/1982311208.4518.227521392.2
+ 7/7/1982306.7206.4118.327381385
+ 7/8/1982313.5207.1918.567221392.6
+ 7/13/1982352.5205.7918.857301485.7
+ 7/14/1982352.7206.2718.757211494.9
+ 7/15/1982350.2207.1218.717121491.6
+ 7/20/1982347.7205.3218.626611508.8
+ 7/21/1982366.5204.6618.776541575.6
+ 7/26/1982352.2208.418.526541554.9
+ 7/27/1982351.2212.1718.516591523.6
+ 7/28/1982347213.9618.226541499.3
+ 7/30/1982342.9215.8318.066581467.9
+ 8/3/1982349.2216.3718.147281536.6
+ "
> ss1 <- textConnection(ss)
> read.zoo(ss1, format = "%m/%d/%Y", header = FALSE)
Error in read.zoo(ss1, format = "%m/%d/%Y", header = FALSE) : 
  index contains NAs


Any other suggestion?



Gabor Grothendieck wrote:
> 
> 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.
>>
> 
> ______________________________________________
> 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Importing-time-series-tp24713580p24714603.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list