read_files_into_df: Read files from a directory and bind them into a single...

View source: R/read_files_into_df.R

read_files_into_dfR Documentation

Read files from a directory and bind them into a single data.frame

Description

Read files from a directory and bind them into a single data.frame

Usage

read_files_into_df(
  file_directory,
  file_pattern = rebus::or("*.csv", "*.xlsx", "*.xls"),
  files_recursive = FALSE,
  clean_names = FALSE,
  ...
)

Arguments

file_directory

Path to the directory containing files of interest

file_pattern

File pattern or regular expression to match the file names on. Supported file types are csv, xlsx, and xls

files_recursive

Boolean. Search for files recursively in the current directory or not. Default is FALSE

clean_names

Boolean. Use janitor::clean_names() on the data as it is being read. Default is FALSE

...

Arbitrary args passed to fread

Value

A data.frame containing rows from the files in the directory.


Aypak/dbhelpers documentation built on Jan. 25, 2024, 9:03 p.m.