Description Usage Arguments Value Author(s) Examples
View source: R/package_functions.R
A wrapper function to read in a file containing data. It uses the file extenstion to determine whether to use the base load or readRDS function for RData and rds files, data.table's fread function for csv files, or readxl's read_excel function for xls and xlsx files.
1 2 3 |
file |
A character string giving the name of the file to get the full folder path for (i.e. "main.R"). |
inFolder |
An identifer to narrow the search in case there are multiple files with same name but in different folders (i.e. "Codes/Model1"). |
showProgress |
A boolean (T, F) indicator specifying whether to show the read in progress if using data.table's fread. |
na.strings |
A vector of character strings to convert to NA |
envir |
The environment to load the data to |
... |
Other arguments to pass to data.tables fread, the base load or readRDS, or readxl's read_excel. |
A data object (data.table or data.frame).
Alex Hubbard (hubbard.alex@gmail.com)
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.