read.in: Opens a File

Description Usage Arguments Examples

View source: R/read.in.R

Description

Wrapper around a read in data frame in a file (like data.table::fread or read.table). Checks whether a file exists first and opens it with specified function. Logs action at the INFO level.

Usage

1
read.in(file, f = data.table::fread, ...)

Arguments

file

character, file path

f

function, reads in the file, defaults to data.table::fread

...

additional arguments passed to f

Examples

1
2
3
4
5
## Not run: 
read.in("test.csv")
read.in("dat.csv", read.table, header = TRUE)

## End(Not run)

jennguyen1/scriptR documentation built on May 29, 2019, 1:05 a.m.