Learn R Programming

arrow (version 8.0.0)

write_csv_arrow: Write CSV file to disk

Description

Write CSV file to disk

Usage

write_csv_arrow(
  x,
  sink,
  file = NULL,
  include_header = TRUE,
  col_names = NULL,
  batch_size = 1024L,
  write_options = NULL,
  ...
)

Arguments

x

data.frame, RecordBatch, or Table

sink

A string file path, URI, or OutputStream, or path in a file system (SubTreeFileSystem)

file

file name. Specify this or sink, not both.

include_header

Whether to write an initial header line with column names

col_names

identical to include_header. Specify this or include_headers, not both.

batch_size

Maximum number of rows processed at a time. Default is 1024.

write_options
...

additional parameters

Value

The input x, invisibly. Note that if sink is an OutputStream, the stream will be left open.

Examples

Run this code
# NOT RUN {
tf <- tempfile()
on.exit(unlink(tf))
write_csv_arrow(mtcars, tf)
# }

Run the code above in your browser using DataLab