multiple_filepaths: Obtain a tibble of filepaths

Description Usage Arguments Value

View source: R/multiple_filepaths.R

Description

Obtain a tibble of filepaths by supplying directory paths and pattern (if necessary) of files.

Usage

1
2
3
4
5
6
7
multiple_filepaths(
  path,
  pattern = NULL,
  full.names = TRUE,
  sort = TRUE,
  id_pattern = "[0-9][0-9][0-9]+"
)

Arguments

path

A vector of paths for which to obtain the filepaths to specific files

pattern

NULL by default does not supply a pattern of files to obtain. If a pattern is required input a vector of patterns that align with the paths supplied.

full.names

TRUE by default. Argument passed to list.files(). Returns full path of file.

sort

TRUE by default will sort the filepaths by a subject ID contained inside of the path. FALSE will not sort.

id_pattern

By default is a 3 digit pattern. Searches for the pattern indicated as a subject ID.

Value

A tibble of filepaths.


avalcarcel9/aliviateR documentation built on July 10, 2020, 12:32 p.m.