spot_pkgs_used | R Documentation |
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)
file_path |
String of path to file of interest. |
as_yaml_tags |
Logical, default is |
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.
Character vector of all packages with functions used in the file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.