read.files: Read multiple files into R

View source: R/read.files.R

read.filesR Documentation

Read multiple files into R

Description

Wraps purrr::map() with an option to specify whether the list of files .l should be compiled with tibble::enframe(). Use after gather.files() to pipe in a vector of file paths with human-readable names.

Usage

read.files(.x, read_fn, enframe = TRUE, value = "file")

Arguments

.x

a vector of file paths to read

read_fn

un-quoted file reading function (specific to the file type; i.e. read_csv or vcgImport)

enframe

whether to create a tibble with a name column and a list-column of the files

value

column name for the files held (ignored if enframe = FALSE)

Value

a list or tibble of the files. Use gather.files() to give them nice name before importing.


evanmascitti/ecmfuns documentation built on April 5, 2025, 1:52 a.m.