I am not sure which chunk of code to give you for this particular error. However, I need to finish this report, and any help would be greatly appreciated.
The error is as follows:
Error in eval(expr, envir, enclos) : object 'Trends' not found
Calls: ... handle -> withCallingHandlers -> withVisible -> eval -> eval
Execution halted
to see if there is an object named Trends in the global environment. If not, is there such a named object anywhere in the script? If this is an Rmd document, change the questions to relate to the scope of the chunk in which the error arises.
When you knit an Rmd document to any output format (i.e. Docx, PDF, html, etc) the code gets executed in a clean environment other than the one you are currently working in, so if you haven't included code for defining/importing the Trends object in your Rmd file it is not going to exist in the new working environment.