spot_funs_files {funspotr} | R Documentation |
Spot Packages or Functions in dataframe of Paths
Description
spot_pkgs_files()
: Spot all packages that show-up in R or Rmarkdown or
quarto documents in a dataframe of filepaths.
spot_funs_files()
: Spot all functions and their corresponding packages
that show-up in R or Rmarkdown or quarto documents in a dataframe of
filepaths.
Usage
spot_funs_files(df, ..., .progress = TRUE)
spot_pkgs_files(df, ..., .progress = TRUE)
Arguments
df |
Dataframe containing a column of |
... |
Arguments passed onto |
.progress |
Whether to show a progress bar. Use |
Details
A purrr::safely()
wrapper for mapping spot_pkgs()
or spot_funs()
across
multiple filepaths. I.e. even if some files fail to parse the function will
continue on.
Default settings are meant for files where package libraries are referenced within the files themselves. See README for more details.
Value
Dataframe with relative_paths
and absolute_paths
of file paths
along with a list-column spotted
containing purrr::safely()
named list
of "result" and "error" for each file parsed. Use unnest_results()
to
unnest only the "result" values.
See Also
spot_pkgs()
, spot_funs()
, unnest_results()
Examples
library(funspotr)
library(dplyr)
list_files_github_repo("brshallo/feat-eng-lags-presentation", branch = "main") %>%
spot_funs_files()