How do I tell which R packages to cite in my paper? discusses the use of sessionInfo() to find and cite loaded packages. Is there a sensible way to list which packages have been used (not just loaded)?
Asked
Active
Viewed 156 times
3
-
You should have scripts saved for your analyses. What packages do you need load for them to run without error? You might consider using something like packrat to manage this for you. – Scott Ritchie Aug 05 '15 at 02:02
-
3Start R with `--vanilla`. Run your code. Literally _everything_ that's in (I use `devtools`) `devtools::session_info()` afterwards was instrumental in ensuring you were able to do your paper-worthy analysis. So they should all be cited. We devoted real space to this in our book http://stackoverflow.com/a/23528042/1457051 (so it's not just a pontification) – hrbrmstr Aug 05 '15 at 02:05
-
Here you will find a good shell command using `grep` to extract all used packages from your source code: http://stackoverflow.com/a/23439356/4468078 – R Yoda Nov 16 '16 at 08:52