csv_parse_options: CSV Parsing Options

View source: R/csv.R

csv_parse_optionsR Documentation

CSV Parsing Options

Description

CSV Parsing Options

Usage

csv_parse_options(
  delimiter = ",",
  quoting = TRUE,
  quote_char = "\"",
  double_quote = TRUE,
  escaping = FALSE,
  escape_char = "\\",
  newlines_in_values = FALSE,
  ignore_empty_lines = TRUE
)

Arguments

delimiter

Field delimiting character

quoting

Logical: are strings quoted?

quote_char

Quoting character, if quoting is TRUE

double_quote

Logical: are quotes inside values double-quoted?

escaping

Logical: whether escaping is used

escape_char

Escaping character, if escaping is TRUE

newlines_in_values

Logical: are values allowed to contain CR (0x0d) and LF (0x0a) characters?

ignore_empty_lines

Logical: should empty lines be ignored (default) or generate a row of missing values (if FALSE)?

Examples


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))
open_csv_dataset(tf, parse_options = csv_parse_options(ignore_empty_lines = FALSE))


arrow documentation built on Sept. 11, 2024, 8:02 p.m.