Thanks Gabor for your reply. However it seems that data is not downloaded properly. Please take a look on downloaded data :
> tail(dat2, 20) GMT libor/day-ussnon 2008-11-25 0.93125 2008-11-26 0.98750 2008-11-28 NA 2008-12-01 1.08750 2008-12-02 NA 2008-12-03 0.88125 2008-12-04 0.51875 2008-12-05 NA 2008-12-08 0.18625 2008-12-09 NA 2008-12-10 NA 2008-12-11 NA 2008-12-12 0.11875 2008-12-15 0.11938 2008-12-16 NA 2008-12-17 0.13250 2008-12-18 NA 2008-12-19 0.11000 2008-12-22 NA 2008-12-23 0.11750 Data for 2008-12-22 is given as NA, whereas in the website it is 0ยท11375. Does anyone have a better idea on how to download data from Economagic more efficiently? Gabor Grothendieck wrote: > > Try this (last line only needed if you want times as Date class): > > library(zoo) > z <- zoo(as.matrix(dat2), time(dat2)) > time(z) <- as.Date(time(z)) # optional > > > or you can use as.zoo.timeSeries from the devel version of zoo: > > source("http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/*checkout*/pkg/R/as.zoo.R?rev=557&root=zoo") > z <- as.zoo(dat2) > time(z) <- as.Date(time(z)) # optional > > > > On Tue, Dec 30, 2008 at 6:25 AM, RON70 <ron_michae...@yahoo.com> wrote: >> >> Oh my mistake, I missed the argument nDaysBack = 366. >> >> However pls let me know how to change the data to zoo object. >> >> >> RON70 wrote: >>> >>> I was trying to dw data from Economagic >>> [http://www.economagic.com/em-cgi/data.exe/libor/day-ussnon], using >>> following code : >>> >>> library(fimport) >>> dat2 = economagicSeries("libor/day-ussnon", frequency = "daily") >>> >>> Here I see that data is not complete, downloaded data starts from >>> "2007-12-31 ", whereas actual data is available from 2001. >>> >>> secondly, how I convert that data to a Zoo-object? >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Downloading-data-from-Economagic-tp21215913p21215929.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help@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@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/Downloading-data-from-Economagic-tp21215913p21239643.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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.