Skip to contents

Primarily used for cases where you load metapackages like tidyverse or tidymodels but only want to return those packages that have functions from the package that are actually called. E.g. say you have a library(tidyverse) call but only end-up using functions that are in dplyr -- in that case spot_pkgs() would return "tidyverse" whereas spot_pkgs_used() would return "dplyr".


spot_pkgs_used(file_path, as_yaml_tags = FALSE)



String of path to file of interest.


Logical, default is FALSE. If set to TRUE flattens and puts into a format convenient for pasting in "tags" section of a blogdown post Rmd document.


Character vector of all packages with functions used in the file.


Also does not return uninstalled packages or those loaded when R starts up.

Is essentially just calling spot_funs() |> with(unique(pkgs)) in the background. Does not have as many options as spot_pkgs() though.