Primarily used for cases where you load metapackages like tidyverse
or
tidymodels
but only want to return those packages that are actually used.
E.g. say you have a library(tidyverse)
call but only end-up using functions
that are in dplyr
-- spot_pkgs()
would return "tidyverse"
whereas
spot_pkgs_used()
would return "dplyr"
.
Arguments
- file_path
String of path to file of interest.
- as_yaml_tags
Logical, default is
FALSE
. If set toTRUE
flattens and puts into a format convenient for pasting in "tags" section of a blogdown post Rmd document.
Details
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.