Re: [R] Downloading data from Economagic

2009-01-01 Thread Gabor Grothendieck
I was only addressing the part about converting it to a zoo object.

Contact the fImport maintainer directly to sort out problems with that package.

On Thu, Jan 1, 2009 at 2:06 AM, RON70  wrote:
>
> 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  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.
>

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


Re: [R] Downloading data from Economagic

2008-12-31 Thread RON70

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


Re: [R] Downloading data from Economagic

2008-12-30 Thread Gabor Grothendieck
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  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.


Re: [R] Downloading data from Economagic

2008-12-30 Thread RON70

Still it seems that it is not downloading data properly. For example
observation for date "2008-12-09 " is missing :

> tail(dat2, 30)
2008-10-02 2008-10-06 2008-10-08 2008-10-16 2008-10-20 2008-10-21 2008-10-22
2008-10-24 2008-10-27 2008-10-29 2008-10-30 
   2.681252.368755.375001.937501.512501.281251.11875   
1.281251.268751.140000.73125 
2008-10-31 2008-11-07 2008-11-10 2008-11-12 2008-11-13 2008-11-14 2008-11-17
2008-11-18 2008-11-19 2008-11-20 2008-11-24 
   0.406250.331250.350000.382500.40.412500.4   
0.40.437500.443750.80625 
2008-11-25 2008-11-26 2008-12-08 2008-12-10 2008-12-11 2008-12-12 2008-12-15
2008-12-16 
   0.931250.987500.186250.125000.115000.118750.11938   
0.15938 

Can anyone please tell me whether I missing something?








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-tp21215913p21216192.html
Sent from the R help mailing list archive at Nabble.com.

[[alternative HTML version deleted]]

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


Re: [R] Downloading data from Economagic

2008-12-30 Thread RON70

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.