[R-SIG-Finance] Problem with getFX
Owe Jessen
list at econinfo.de
Wed Jul 7 13:20:33 CEST 2010
Hi,
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?
library(xts)
library(quantmod)
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";
chartSeries(EURGBP)
--
Owe Jessen
Nettelbeckstr. 5
24105 Kiel
post at owejessen.de
http://privat.owejessen.de
More information about the R-SIG-Finance
mailing list