[R-SIG-Finance] Problem with getFX

Wolfgang Wu wobwu22 at yahoo.de
Wed Jul 7 13:33:27 CEST 2010

Just used exactly the code below and it still works fine for me.  

Maybe show the callstack with traceback to see where it failed? 

Maybe Sys.Date isn't a date on your machine (I am speculating now)?

 Wolfgang Wu

----- Ursprüngliche Mail ----
Von: Owe Jessen <list at econinfo.de>
An: r-sig-finance <r-sig-finance at stat.math.ethz.ch>
Gesendet: Mittwoch, den 7. Juli 2010, 12:20:33 Uhr
Betreff: [R-SIG-Finance] Problem with getFX


I was just trying Wolfgang Wu's loop to load long histories of FX from oanda, 
but get the following error message.

Fehler in xts(as.numeric(fr[1:length(fr)%%2 != 1]), as.Date(fr[1:length(fr)%%2 
==  :
  NROW(x) must match length(order.by)
Zusätzlich: Warnmeldungen:
1: In readLines(tmp) :
  unvollständige letzte Zeile in 
'C:\DOKUME~1\Owe\LOKALE~1\Temp\RtmpxZe1Dw\file5f906952' gefunden
2: In xts(as.numeric(fr[1:length(fr)%%2 != 1]), as.Date(fr[1:length(fr)%%2 ==  :
  NAs durch Umwandlung erzeugt

Has anybody an idea what went wrong?

EURGBP <- xts(get(getFX('EUR/GBP', from = (Sys.Date() - 499), to = Sys.Date())))
for (iDate in seq(500, 2000, by=500)){
    EURGBP <- rbind.xts(EURGBP, get(getFX('EUR/GBP', from = Sys.Date() - iDate - 
499, to = Sys.Date() - iDate)))
colnames(EURGBP) <- "Close";

-- Owe Jessen
Nettelbeckstr. 5
24105 Kiel
post at owejessen.de

R-SIG-Finance at stat.math.ethz.ch mailing list
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 

More information about the R-SIG-Finance mailing list