I am using RMarkdown to do a monthly report for almost two years. The R markdown, which includes a bunch of leaflet maps, tables, and figures, was working today morning beautifully until the afternoon. Now, every time I knitr not, I am getting this error about not object can be found.
Error in eval(expr, envir, enclos) : object 'lf_province' not found
Calls: <Anonymous> ... handle -> withCallingHandlers -> withVisible -> eval -> eval
In addition: There were 50 or more warnings (use warnings() to see the first 50)
This happen in vast majority of my objects. If I do code chunk by chunk, it works. I also make sure that my code sources relate to the RMarkdown are working. I try the following solutions:
- Clean my knitr cache.
- Added cache=FALSE in all my code chunks.
Neither of those solutions was successful in fixing the issue. I read somewhere that a workaround is to save my environment then load the environment during knitting, but that is not the spirit or purpose of the R Markdown. I do not try that method until I have not option Does someone have an idea of what is going on?
Thank you