[R-SIG-Finance] quantmod FX from Oanda

Brian G. Peterson brian at braverock.com
Tue Jul 2 18:22:48 CEST 2013


On 07/02/2013 11:14 AM, Martin Bauer wrote:
> I have tried this
> load.packages("TTR,PerformanceAnalytics,quantmod")
> getFX("USD/JPY",src="oanda",from="2013-01-01",to="2013-07-01")
> but I receive the following error msg
> Error in xts(as.numeric(fr[1:length(fr)%%2 != 1]),
> as.Date(fr[1:length(fr)%%2 ==  :
>    NROW(x) must match length(order.by)
> In addition: Warning messages:
> 1: In readLines(tmp) :
>    incomplete final line found on
> '/var/folders/23/shh8stb17gz9fgtsk0q4wl2w0000gn/T//Rtmp2PmND4/file43a7cc6d'
> 2: In xts(as.numeric(fr[1:length(fr)%%2 != 1]),
> as.Date(fr[1:length(fr)%%2 ==  :
>    NAs introduced by coercion
> Any idea ??

Works for me with current versions of all the packages and R.

You didn't include your sessionInfo().

I suggest upgrading to current code.

Regards,

Brian

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list