Have in mind that when you knit an Rmd document the code gets executed in a clean environment other than the one you are currently working on so you have to include the necessary code to load any external data you are working with.
For example, if economic_data
comes from a csv file, you would include something like this
economic_data <- read.csv("path_to_your _file.csv")
If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.