prep_access: Prepare access

Description Usage Arguments Value Examples

View source: R/prep_access.R

Description

Extract fileNames from data file(s) and add them to access.csv. The helper validate_file_paths can be used to create vectors of valid file paths that can be checked and then passed as data_path argument to prep_access.

Usage

1
prep_access(data_path = "data", access_path = "data/metadata/access.csv", ...)

Arguments

data_path

character vector of either:

  1. path(s) to the data file(s).

  2. single path to directory containing data file(s). Currently only tabular .csv and .tsv or .rds files are supported.

access_path

path to the access.csv file. Defaults to data/metadata/access.csv.

...

parameters passed to list.files(). For example, use recursive = TRUE to list files in a folder recursively or use pattern to filter files for patterns.

Value

Updates access.csv and writes to access_path.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# First create the metadata tempaltes
create_spice()

# Then begin filling them in from your data files
prep_access()

## End(Not run)

dataspice documentation built on May 17, 2021, 1:09 a.m.