Skip to contents

spot_pkgs_files() : Spot all packages that show-up in R or Rmarkdown documents in a dataframe of filepaths.

spot_funs_files() : Spot all functions and their corresponding packages that show-up in R or Rmarkdown documents in a dataframe of filepaths.

Usage

spot_funs_files(df, ...)

spot_pkgs_files(df, ...)

Arguments

df

Dataframe containing a column of absolute_paths.

...

Arguments passed onto spot_{pkgs|funs}().

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.

Details

A purrr::safely() wrapper for mapping spot_pkgs() or spot_funs() across multiple filepaths.

Defaults are meant for files where package libraries are referenced within the files themselves.

Examples

if (FALSE) {
library(funspotr)
library(dplyr)

list_files_github_repos("brshallo/feat-eng-lags-presentation", branch = "main", preview = TRUE) %>%
  spot_funs_files()
}