auto_read: Automatic file reader

Description Usage Arguments Value

View source: R/file_io.R

Description

Attempts to automatically recognize table type and import as tibble or data.table. Latest version incorporates *dots* to facilitate passing all possible options for each file reader type.

Usage

1
2
3
auto_read(file, reader = "", stringsAsFactors = F,
  remove.empty.columns = F, remove.empty.rows = F, make.names.valid = T,
  make.names.unique = T, ...)

Arguments

file

path to an tabular data file

reader

string, Specify which package to read in your table, options include: read_excel, read.delim, read.csv, fread. NOTE: fread option will return a data.table, all others return data frame.

remove.empty.columns, remove.empty.rows

logical, to remove columns or rows composed entirely of NA, "NA", or blank values

make.names.valid, make.names.unique

logical, uses base make.names function to clean table names and make unique.

...

Pass any file-type appropriate arguments on to their handler functions. e.g., readxl::read_excel(), read.delim(), read.csv()

Value

dataframe or data.table, see reader parameter.


dkrozelle/toolboxR documentation built on Sept. 22, 2018, 11:45 p.m.