CSV Parsing Options
csv_parse_options(
delimiter = ",",
quoting = TRUE,
quote_char = "\"",
double_quote = TRUE,
escaping = FALSE,
escape_char = "\\",
newlines_in_values = FALSE,
ignore_empty_lines = TRUE
)
Field delimiting character
Logical: are strings quoted?
Quoting character, if quoting
is TRUE
Logical: are quotes inside values double-quoted?
Logical: whether escaping is used
Escaping character, if escaping
is TRUE
Logical: are values allowed to contain CR (0x0d
)
and LF (0x0a
) characters?
Logical: should empty lines be ignored (default) or
generate a row of missing values (if FALSE
)?
tf <- tempfile()
on.exit(unlink(tf))
writeLines("x\n1\n\n2", tf)
read_csv_arrow(tf, parse_options = csv_parse_options(ignore_empty_lines = FALSE))
#> # A tibble: 3 × 1
#> x
#> <int>
#> 1 1
#> 2 NA
#> 3 2
open_csv_dataset(tf, parse_options = csv_parse_options(ignore_empty_lines = FALSE))
#> FileSystemDataset with 1 csv file
#> 1 columns
#> x: int64