Description Usage Arguments See Also Examples
This is a wrapper for readr::read_delim()
that guesses the main arguments,
namely delim
, quote
, col_names
, encoding
, decimal_mark
, grouping_mark
, and skip
.
1 2 3 4 5 6 7 8 9 | frk_read_delim(file, delim = guess_delim(file, guess_max)$char[1],
quote = guess_quote(file, guess_max), escape_backslash = FALSE,
escape_double = TRUE, col_names = guess_has_header(file, guess_max),
col_types = NULL, locale = readr::locale(encoding = guess_encoding(file,
guess_max)$encoding[1], decimal_mark = guess_decimal_mark(file, guess_max),
grouping_mark = guess_grouping_mark(file, guess_max)), na = c("", "NA"),
quoted_na = TRUE, comment = "", trim_ws = TRUE,
skip = guess_skip(file, guess_max), n_max = Inf, guess_max = min(10,
n_max))
|
file |
Path to file |
delim |
(Guessed) Delimiter of file |
quote |
(Guessed) Character used to quote strings |
escape_backslash |
Whether backslashed are used to escape special characters |
escape_double |
Whether quotes are escaped by doubling them |
col_names |
(Guessed) Whether file has column names or vector with column names |
col_types |
Vector with types to be forced on columns or NULL for guess |
locale |
(Guessed) Some region-dependent information |
na |
String or character vector to use for missing values |
quoted_na |
Whether missing values can be quoted |
comment |
String that indicates comments |
trim_ws |
Whether to trim whitespace from each field |
skip |
(Guessed) Number of lines to skip before reading data |
n_max |
Maximum number of records to read |
guess_max |
Maximum number of records to use for guess |
readr::read_delim()
, readr::locale()
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
# Create sample file
file <- tempfile()
write.table(
dplyr::storms, file, sep = "|", dec = ",",
col.names = TRUE, row.names = FALSE)
# Read file
tbl <- frk_read_delim(file)
glimpse(tbl)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.