Yep I had exact error message while working with Gapminder. I checked for MASS and sure enough it was loaded. My question is this if you are running different scripts/rmarkdown etc in the same session then there is not a possibility of packages being shared between them? If so that could also be the root of the problem.
@StatistikinDD2 жыл бұрын
Different scripts in the same R session share packages, i. e. if one is loaded in one script, it is no different than being loaded in another script. Markdown documents get their own session, i. e. packages need to be loaded in that exact markdown script (you may "source" a script from within markdown, of course). Markdown also does not access the global environment. Data present in the global environment, but not specified in your .Rmd will not be found by the .Rmd script.
@haraldurkarlsson11472 жыл бұрын
@@StatistikinDD I tend to do most of my work in a script rather than RMarkdown. I was unaware of these particulars of RMarkdown. It might be a good idea to do a video of the difference between working in a script vs. RMarkdown. Most of us are unaware of these subtleties. Thanks.
@StatistikinDD2 жыл бұрын
@@haraldurkarlsson1147 Good idea, thank you! Currently little time for videos, but I'll keep it in mind.