Wrapper over searching repositories by code blobs related to
loading package (library(package) and require(package) in all files) or
using it as a dependency (package in DESCRIPTION and NAMESPACE
files).
Usage
get_R_package_usage(
gitstats,
packages,
only_loading = FALSE,
split_output = FALSE,
cache = TRUE,
verbose = is_verbose(gitstats)
)Arguments
- gitstats
A GitStats object.
- packages
A character vector, names of R packages to look for.
- only_loading
A boolean, if
TRUEfunction will check only if package is loaded in repositories, not used as dependencies.- split_output
Optional, a boolean. If
TRUEwill return a list of tables, where every element of the list stands for the package passed topackagesparameter. IfFALSE, will return only one table with name of the package stored in first column.- cache
A logical, if set to
TRUEGitStats will retrieve the last result from its storage.- verbose
A logical,
TRUEby default. IfFALSEmessages and printing output is switched off.
Examples
if (FALSE) { # \dontrun{
my_gitstats <- create_gitstats() %>%
set_github_host(
token = Sys.getenv("GITHUB_PAT"),
orgs = c("r-world-devs", "openpharma")
)
get_R_package_usage(
gitstats = my_gitstats,
packages = c("purrr", "shiny"),
split_output = TRUE
)
} # }