Search code examples
rquantmod

`quantmod`'s `getSymbols.FRED` not working as expected


The following lines are from quantmod's manual (p54):

library(quantmod)
getSymbols('CPIAUCNS',src='FRED')

returns:

Error in download.file(paste(FRED.URL, "/", Symbols[[i]], "/", "downloaddata/",  : 
  cannot open URL 'http://research.stlouisfed.org/fred2/series/CPIAUCNS/downloaddata/CPIAUCNS.csv'

How to fix this?

(using latest version of both R and quantmod)


Solution

  • Use https:// for the URL instead.