0

I'm trying to download currencies historical data from yahoo finance using fimport package in R. the function i'm using is yahooSeries.But the problem is that for some currencies its work like: NZD=X,JPY=X.

But for some currencies its not working, for example: NZDAUD=X and the error is:

trying URL 'http://chart.yahoo.com/table.csv?s=NZDAUD=X&a=&b=&c=&d=11&e=08&f=2016&g=d&x=.csv'

cannot open URL 'http://chart.yahoo.com/table.csv?s=NZDAUD=X&a=&b=&c=&d=11&e=08&f=2016&g=d&x=.csv': HTTP status was '404 Not Found'
Error in yahooSeries(symbols = "NZDAUD=X", from = "2010-01-01") : 
trying to get slot "data" from an object of a basic class ("character") with no slots".

Can someone understand what the problem is? there are currencies that can't been downloaded by Yahoo finance? thanks.

figurine
  • 746
  • 9
  • 22
yudyud
  • 27
  • 1
  • 6
  • why don't you use both possibilities and `try/catch` structure ? Can you give examples ? – ClementWalter Dec 08 '16 at 09:33
  • what you mean both possibilities? the issue is that some currencies return errors. – yudyud Dec 08 '16 at 09:44
  • I didn't get you were using a specific package. You could try using the url in with basic import function, e.g. following https://www.r-bloggers.com/getting-data-from-an-online-source/ – ClementWalter Dec 08 '16 at 09:53
  • what is the advantage if there is already a package for downloading from yahoo? – yudyud Dec 08 '16 at 12:12
  • If there were no problem there would be no question. If the package is not perfect, building your own solution is a possibility – ClementWalter Dec 08 '16 at 12:31
  • ok, now i understand you. thanks. But maybe there is another possibility that yahoo finance dont support all currencues data? – yudyud Dec 08 '16 at 17:22

0 Answers0