Hi Almendal99 I fixed that error but now I'm getting a similar error:
The code works fine, if it upload to bookdown it works fine but it won't knit - very frustrating.
It seems that if I reproduce all the code on the page I want to knit, it works fine. But for some reason it isn't "seeing" the output from the other Rmd page.
I think the problem is that I didn't realize that each Rmd page is standalone and I have to reload and run the code on each page. For some reason it doesn't share the global environment.