Skip to content

Commit

Permalink
Add example for csv_write_options
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisnic committed Oct 7, 2023
1 parent ccf04ff commit cf6a751
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion r/R/csv.R
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,10 @@ readr_to_csv_write_options <- function(col_names = TRUE,
#' rendering can contain quotes itself (e.g. strings or binary values)), "AllValid" (Enclose all valid values in
#' quotes), or "None" (Do not enclose any values in quotes).
#'
#' @examples
#' tf <- tempfile()
#' on.exit(unlink(tf))
#' write_csv_arrow(airquality, tf, write_options = csv_write_options(null_string = "-99"))
#' @export
csv_write_options <- function(include_header = TRUE,
batch_size = 1024L,
Expand Down Expand Up @@ -846,7 +850,7 @@ readr_to_csv_convert_options <- function(na,
#' @param batch_size Maximum number of rows processed at a time. Default is 1024.
#' @param na value to write for NA values. Must not contain quote marks. Default
#' is `""`.
#' @param write_options see [file reader options][CsvWriteOptions]
#' @param write_options see [CSV write options][csv_write_options]
#' @param ... additional parameters
#'
#' @return The input `x`, invisibly. Note that if `sink` is an [OutputStream],
Expand Down
5 changes: 5 additions & 0 deletions r/man/csv_write_options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion r/man/write_csv_arrow.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf6a751

Please sign in to comment.