Removing unused libraries in R

So, I just finished writing my first script to collect Weibull analysis from a text file. In all my messing around, I suspect that I may have downloaded some libraries that are not used in the final script. Is there a quick way to check which libraries are used by a script without checking each function?

+5
source share
1 answer

If you attach libraries through library or require , the easiest way is to look for code for them. If you invoke libraries without attaching them using the <library>::<export> syntax, look for :: . If you are worried about transitive dependencies or just want to create a reproducible environment, take a look at packrat package: http://rstudio.imtqy.com/packrat/

0
source

Source: https://habr.com/ru/post/1212713/


All Articles