| read_file_delim | R Documentation |
read_file_delim() reads delimited files using
vroom(). This allows the use of ALTREP columns,
which don't load data into memory until they are needed.
read_file_delim(
file,
col_select = NULL,
col_types = vroom::cols(.default = vroom::col_character()),
na = c("", ".", "NA", "na", "Na", "N/A", "n/a", "N/a", "NULL", "null", "Null"),
guess_max = .Machine$integer.max%/%100L,
delim = NULL,
...
)
file |
path to a local file. |
col_select |
One or more selection expressions, like in
|
col_types |
One of If Column specifications created by Alternatively, you can use a compact string representation where each character represents one column:
|
na |
Character vector of strings to interpret as missing values. Set this
option to |
guess_max |
Maximum number of lines to use for guessing column types. |
delim |
One or more characters used to delimit fields within a
file. If |
... |
Additional arguments to pass to |
By default, read_file_delim() does not attempt to guess column types and
reads all columns as character. This can be changed by setting
col_types = vroom::cols(.default = vroom::col_guess()). If columns are
guessed, the default is to use all rows; this can be changed by setting
guess_max to a different value.
This saves a
significant amount of time and space when loading data with many rarely used
columns.read_file_delim() will eventually be paired with
read_file_excel() to replace the internals of
read_file().
A tibble if reading one file; a list of tibbles if reading
multiple
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.