write_csv: Write a CSV

View source: R/utils.R

write_csvR Documentation

Write a CSV

Description

Wrapper for the data.table::fwrite function fot saving large data.frames quickly in a CSV file.

Usage

write_csv(data, file, quote = "auto", na = "NA", ...)

Arguments

data

(data.frame) The data to save.

file

(character(1)) The file to save the data.

quote

(character(1)) The quote strategy to use. "auto" by default. See data.table::fwrite for more information.

na

(character(1)) The string to use for NA values. "NA" by default.

...

(...) Other arguments to pass to data.table::fwrite.

Examples

## Not run: 
write_csv(iris, "iris.csv")
write_csv(data.frame(a = 1:10, b = 1:10), "my_file.csv")

## End(Not run)


brandon-mosqueda/SKM documentation built on Feb. 8, 2025, 5:24 p.m.