write_file_delim() writes delimited files using vroom_write().

write_file_delim(
  x,
  path,
  delim = ",",
  na = "",
  clean = TRUE,
  force = FALSE,
  ...
)

Arguments

x

Data frame or data frame extension to write to disk

path

Path or connection to write to

delim

Delimiter used to separate values. Defaults to "," to write comma-separated value (CSV) files.

na

String used for missing values. Defaults to blank ("").

clean

Should atomic columns be cleaned before writing? This prevents ambiguity when reading in later.

force

Should any existing files be overwritten?

...

Additional arguments to pass to vroom_write()

Value

The input data

Details

By default, files are comma-delimited with missing values represented as blank strings ("").

When clean = TRUE, all atomic vectors are converted to character, transliterated to ASCII, and "squished". This is recommended unless preserving whitespace is important, as it prevents ambiguity when reading line breaks later.