Description Usage Arguments Examples
Enframe a list of file paths into a tibble
1 2 3 4 5 6 7 | rg_enframe(
folder,
pattern = ".tif$",
recursive = F,
sep = "_",
sep_into = NULL
)
|
folder |
string, path to folder where the files are stored |
pattern |
string, a pattern used to identify the files, see |
recursive |
logical, should the listing recurse into directories? |
sep |
string, separator that is used to split up the basename of the files into different columns.
If character, sep is interpreted as a regular expression. The default value is a regular expression that matches any sequence of non-alphanumeric values.
If numeric, sep is interpreted as character positions to split at. Positive values start at 1 at the far-left of the string; negative value start at -1 at the far-right of the string. The length of sep should be one less than sep_into.
see |
sep_into |
string, names of new variables to create as character vector. Use NA to omit the variable in the output. |
1 2 | folder <- 'data/files'
df <- rg_enframe(folder, pattern = '.csv$', sep = '_', sep_into = c(NA, 'year', 'type'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.