The Stan values for allowed_packages, export_index, and origin_map
are generated by data_raw/sysdata.R.
Usage
scan_usage(
path = ".",
ignore_unqualified_functions = .stdlib_funs,
strict = FALSE,
skip_dirs = .scan_skip_dirs,
allowed_packages = .stan_pkgs,
export_index = .stan_export_index,
origin_map = .stan_origin_map
)Arguments
- path
A single project directory (searched recursively) or a vector of files (.R/.Rmd/.qmd).
- ignore_unqualified_functions
Character vector of function names to ignore when attributing (unqualified) calls to Stan packages. Defaults to exports from base R packages listed in
stdlib_funs(). Calls likerstan::plot()will NOT be ignored even ifplotis inignore_unqualified_functions.- strict
If
TRUE, only count unqualified function calls that resolve to a single Stan package.- skip_dirs
Character vector of directory names to skip when scanning a directory. Defaults to
.scan_skip_dirs.- allowed_packages
Character vector of package namespaces to attribute to Stan usage. Defaults to
.stan_pkgs.- export_index
Named list mapping function names to packages. Defaults to
.stan_export_index.- origin_map
Named character vector mapping
pkg::funkeys to the origin package. Defaults to.stan_origin_map.