Skip to contents

Return a dataframe containing the paths of files in the working directory. Generally used prior to spot_{funs/pkgs}_files().

Usage

list_files_wd(path = ".", keep_non_r = FALSE)

Arguments

path

Character vector or path. Default is "." which will set the starting location for relative_paths.

keep_non_r

Logical, default is FALSE so keeps only records with relative_paths ending in "(r|rmd|rmarkdown)$".

Value

Dataframe with columns of relative_paths and absolute_paths.

Details

Can also be used outside of working directory if path is specified.

Examples

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

# pulling and analyzing my R file github gists
files_local <- list_files_wd()

# Will just parse the first 2 files/gists
contents <- spot_funs_files(slice(files_local, 1:2))

contents %>%
  unnest_results()
}