epi_read | R Documentation |
epi_read() reads files with a consistent convenience function. Wraps as.tibble and data.table's fread.
epi_read(
input_name = "",
na.strings = c(-Inf, "NULL", NULL, ".", "", "NA", "NaN", NA, "<NA>"),
header = TRUE,
stringsAsFactors = FALSE,
strip.white = TRUE,
...
)
input_name |
file to read as a string |
na.strings |
as for data.table::fread() with extended defaults |
header |
as for data.table::fread(), default is TRUE |
stringsAsFactors |
as for data.table::fread(), default is also FALSE |
strip.white |
as for data.table::fread(), default is also TRUE |
... |
pass any other data.table::fread() parameters |
A tibble
Other parameters as specified by data.table::fread() You are probably better off using the standard read.csv(), data.table::fread() or other functions unless you are reading in several similarly constructed files. Files are read with data.table first and then converted to a tibble. Columns will be read as integer, numeric or character only. White space is stripped. Strings are read as character only. Assumes the first row is a header.
Antonio Berlanga-Taylor <\url{https://github.com/AntonioJBT/episcout}>
fread
, as.tibble
.
## Not run:
super_data <- epi_read('super_data.tsv')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.