Skip to content

economagic Import - error message

4 messages · stephenc, Yohan Chalabi, Diethelm Wuertz +1 more

#
S> > # save a download to a data file
   S> > file = 'fedfunds.csv'
   S> > source = 'http://www.economagic.com/em-cgi/data.exe/'
   S> > query = 'fedst1/fedfunds+2'
   S> > # download
   S> > economagicImport(file, source, query)
   S> Error in download.file(url = url, destfile = file, method =
   S> method) :
   S> unsupported URL scheme
   S> [1] "No Internet Access"

there is a typo in your query. It should be
query = 'fedstl/fedfunds+2'

and your arguemnts in economagicImport are not in the correct order...
?economagicImport

regards,
Yohan
#
Yohan Chalabi wrote:
Some additional information

Note, that economagicImport() requires also the input of the frequency
of the data. The default is "quarterly", alternatively you can use "monthly"
and "daily" frequency formats.

FED FUNDS data are available as monthly and weekly (in daily format)
data sets from economagic.com. Therefore you should specify
explicitely the frequency data in the argument list. Here the examples:

# I used R 2.6.2 with latest package updates
require(fImport)

# For weekly data (with daily date formats) use:
x = economagicImport(query = "fedstl/day-ff", frequency = "daily")
head(x at data) # gives you the series as a data.frame
head(as.timeSeries(x at data)) # converts it in a timeSeries object

# For monthly data use:
y = economagicImport(query = "fedstl/fedfunds+2", frequency = "monthly")
head(y at data) # gives you the series as a data.frame
head(as.timeSeries(y at data)) # converts it in a timeSeries object


Some more note: FED FUND data are also available from the St.
Louis FED data base, from where economagic.com has copied his
data. Since the FED uses ISO 8601 date records, and data are
earlier available I would recommend to download the data with
the function fredImport().


Diethelm Wuertz

  
    
#
As Diethelm pointed out - the St. Louis Fed has most of the economagic series.

In addition to the Rmetrics interface there is one in quantmod.  A
list of all FRED series (19000+) is accessible from here:

http://research.stlouisfed.org/fred2/

library(quantmod)
[1] "FEDFUNDS"
FEDFUNDS
1954-07-01     0.80
1954-08-01     1.22
1954-09-01     1.06
1954-10-01     0.85
1954-11-01     0.83
1954-12-01     1.28
[1] "FF"
FF
1954-07-07 1.00
1954-07-14 1.21
1954-07-21 0.57
1954-07-28 0.63
1954-08-04 0.27
1954-08-11 1.30


On Thu, Apr 17, 2008 at 3:03 AM, Diethelm Wuertz
<wuertz at itp.phys.ethz.ch> wrote: