There is an R package fredr to access the FRED database: <a href="https://cran.r-project.org/web/packages/fredr/index.html" rel="nofollow">https://cran.r-project.org/web/packages/fredr/index.html</a> .