write_file_delim: Efficiently Write Delimited Files

Description Usage Arguments Details Value

View source: R/write_file_delim.R

Description

write_file_delim() writes delimited files using vroom_write().

Usage

1
2
3
4
5
6
7
8
9
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()

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.

Value

The input data


jesse-smith/covidprod documentation built on Oct. 11, 2021, 5:34 p.m.