guess_types | R Documentation |
Guess data types in a delimited text file (thin wrapper on data.table::fread)
guess_types(
file,
sep = "auto",
sep2 = "auto",
dec = ".",
quote = "\"",
nrows = 10000,
header = "auto",
na.strings = c("", "NA", "NULL"),
skip = "__auto__",
select = NULL,
drop = NULL,
colClasses = NULL,
col.names,
check.names = FALSE,
encoding = "unknown",
...
)
file |
File name in working directory, path to file (passed through |
sep |
The separator between columns. Defaults to the character in the set |
sep2 |
The separator within columns. A |
dec |
The decimal separator as in |
quote |
By default ( |
nrows |
The maximum number of rows to read. Unlike |
header |
Does the first data line contain column names? Defaults according to whether every non-empty field on the first data line is type character. If so, or TRUE is supplied, any empty column names are given a default name. |
na.strings |
A character vector of strings which are to be interpreted as |
skip |
If 0 (default) start on the first line and from there finds the first row with a consistent number of columns. This automatically avoids irregular header information before the column names row. |
select |
A vector of column names or numbers to keep, drop the rest. |
drop |
Vector of column names or numbers to drop, keep the rest. |
colClasses |
As in |
col.names |
A vector of optional names for the variables (columns). The default is to use the header column if present or detected, or if not "V" followed by the column number. This is applied after |
check.names |
default is |
encoding |
default is |
... |
further arguments passed to data.table::fread |
data.table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.