read_directory: Read Multiple Flat Files Into _R_ Simultaneously

Description Usage Arguments Value Examples

Description

Searches for flat files of a specific type and reads them into _R_ to form one large 'tibble'

Usage

1
read_directory(dir, pattern = NULL, delim = ",")

Arguments

dir

Location of the files to be read into R.

pattern

The file extension or pattern to match. Default 'NULL' returns all files in a directory.

delim

The delimiter between successive observations. Default ','.

Value

A 'tibble' containing all files read into _R_.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Relative path
hw03_grades = read_directory("grades/hw/hw03-grades")

# Only CSVs
hw01_grades = read_directory("grades/hw/hw01-grades", pattern = ".csv", delim = ",")

## End(Not run)

coatless/coursetools documentation built on May 25, 2019, 3:26 p.m.