The goal of
annotater is to annotate package load calls in character strings and R/Rmd files, so we can have an idea of the overall purpose of the libraries we’re loading.
The two annotation types are also available together:
Thanks to a Pull Request by Juan Cruz Rodriguez, we can now annotate which functions from each package are being called in a script.
Install the development version of
annotater from GitHub with:
# install.packages("remotes") remotes::install_github("luisDVA/annotater")
Restart RStudio after the installation for the addins to load properly.
These are the possible annotations, which can be added to character strings (with one line per element), or applied to .R or .Rmd files in RStudio through their corresponding addins.
library(annotater) test_string <-c("library(boot)\nrequire(Matrix)") writeLines(annotate_pkg_calls(test_string)) writeLines(annotate_repo_source(test_string)) writeLines(annotate_repo_source(test_string))
Entire .R files can also be parsed and annotated with the