You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by fs...@apache.org on 2019/06/28 14:42:05 UTC
[arrow] branch master updated: ARROW-5773: [R] Clean up
documentation before release
This is an automated email from the ASF dual-hosted git repository.
fsaintjacques pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 2e90592 ARROW-5773: [R] Clean up documentation before release
2e90592 is described below
commit 2e9059278735bceb521562b326650449898cce44
Author: Neal Richardson <ne...@gmail.com>
AuthorDate: Fri Jun 28 10:41:53 2019 -0400
ARROW-5773: [R] Clean up documentation before release
This cleans up a lot of the docs for the reader and writer functions, which are the main end-user-facing functions this release will expose. See a preview of the docs site at https://enpiar.com/arrow-r-site/reference/, with focus on the "above the fold" functions.
There's a lot more to do, but I think this is the minimum before we submit to CRAN, and it would be great to get as much of the cleanup in 0.14 so that there's not a divergence between official 0.14 and CRAN 0.14.
This patch also adds a trivial "example" to one of the man pages, without which CRAN has been known to reject.
Author: Neal Richardson <ne...@gmail.com>
Author: Wes McKinney <we...@apache.org>
Closes #4736 from nealrichardson/r-final-final-docs and squashes the following commits:
4c5bdf4b7 <Neal Richardson> Update man pages
680d3b6ca <Neal Richardson> Remove one other external link
cdd3bce25 <Wes McKinney> Add missing use_threads read option
2243650df <Neal Richardson> Remove doc link to vroom package to avoid possible check NOTE
34c78ef71 <Neal Richardson> Doc cleanup and consolidation
---
r/DESCRIPTION | 1 +
r/R/arrow-package.R | 2 ++
r/R/csv.R | 31 +++++++++++++-------------
r/R/feather.R | 36 +++++++++++++++----------------
r/R/json.R | 37 ++++++++++----------------------
r/R/parquet.R | 19 ++++++++--------
r/R/write_arrow.R | 3 +--
r/_pkgdown.yml | 1 -
r/man/FeatherTableReader.Rd | 8 +++----
r/man/FeatherTableWriter.Rd | 6 +++---
r/man/arrow__json__TableReader.Rd | 2 +-
r/man/arrow_available.Rd | 3 +++
r/man/csv_convert_options.Rd | 4 ++--
r/man/csv_parse_options.Rd | 9 +++++---
r/man/csv_read_options.Rd | 16 +++++++++-----
r/man/csv_table_reader.Rd | 20 ++++++++++-------
r/man/json_parse_options.Rd | 14 ------------
r/man/json_read_options.Rd | 16 --------------
r/man/json_table_reader.Rd | 21 ------------------
r/man/parquet_arrow_reader_properties.Rd | 5 +++--
r/man/parquet_file_reader.Rd | 6 +++---
r/man/read_delim_arrow.Rd | 2 +-
r/man/read_feather.Rd | 8 +++----
r/man/read_json_arrow.Rd | 17 ++++++++++-----
r/man/read_parquet.Rd | 19 ++++++++--------
r/man/write_arrow.Rd | 6 ++----
r/man/write_feather.Rd | 11 ++++------
r/man/write_feather_RecordBatch.Rd | 17 +++++++++++++++
28 files changed, 156 insertions(+), 184 deletions(-)
diff --git a/r/DESCRIPTION b/r/DESCRIPTION
index 47eccc8..ad1ac92 100644
--- a/r/DESCRIPTION
+++ b/r/DESCRIPTION
@@ -19,6 +19,7 @@ License: Apache License (>= 2.0)
URL: https://github.com/apache/arrow/
BugReports: https://issues.apache.org/jira/projects/ARROW/issues
Encoding: UTF-8
+Language: en-US
LazyData: true
SystemRequirements: C++11
LinkingTo:
diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R
index d21931c..86e909e 100644
--- a/r/R/arrow-package.R
+++ b/r/R/arrow-package.R
@@ -33,6 +33,8 @@
#' with the Arrow C++ library. If `FALSE`, you'll need to install the C++
#' library and then reinstall the R package. See [install_arrow()] for help.
#' @export
+#' @examples
+#' arrow_available()
arrow_available <- function() {
.Call(`_arrow_available`)
}
diff --git a/r/R/csv.R b/r/R/csv.R
index 8f4370a..6ac0118 100644
--- a/r/R/csv.R
+++ b/r/R/csv.R
@@ -19,7 +19,7 @@
#'
#' These functions uses the Arrow C++ CSV reader to read into a `data.frame`.
#' Arrow C++ options have been mapped to argument names that follow those of
-#' [readr::read_delim()], and `col_select` was inspired by [vroom::vroom()].
+#' `readr::read_delim()`, and `col_select` was inspired by `vroom::vroom()`.
#'
#' `read_csv_arrow()` and `read_tsv_arrow()` are wrappers around
#' `read_delim_arrow()` that specify a delimiter.
@@ -189,15 +189,17 @@ read_tsv_arrow <- function(file,
`arrow::csv::ParseOptions` <- R6Class("arrow::csv::ParseOptions", inherit = `arrow::Object`)
`arrow::csv::ConvertOptions` <- R6Class("arrow::csv::ConvertOptions", inherit = `arrow::Object`)
-#' read options for the csv reader
+#' Read options for the Arrow file readers
#'
-#' @param block_size Block size we request from the IO layer; also determines the size of chunks when use_threads is `TRUE`
+#' @param use_threads Whether to use the global CPU thread pool
+#' @param block_size Block size we request from the IO layer; also determines the size of chunks when use_threads is `TRUE`. NB: if false, JSON input must end with an empty line
#'
#' @export
-csv_read_options <- function(block_size = 1048576L) {
+csv_read_options <- function(use_threads = option_use_threads(),
+ block_size = 1048576L) {
shared_ptr(`arrow::csv::ReadOptions`, csv___ReadOptions__initialize(
list(
- use_threads = option_use_threads(),
+ use_threads = use_threads,
block_size = block_size
)
))
@@ -224,8 +226,7 @@ readr_to_csv_parse_options <- function(delim = ",",
)
}
-#' CSV parsing options
-#'
+#' Parsing options for Arrow file readers
#'
#' @param delimiter Field delimiter
#' @param quoting Whether quoting is used
@@ -263,7 +264,7 @@ csv_parse_options <- function(delimiter = ",",
))
}
-#' Conversion Options for the csv reader
+#' Conversion options for the CSV reader
#'
#' @param check_utf8 Whether to check UTF8 validity of string columns
#'
@@ -289,20 +290,20 @@ csv_convert_options <- function(check_utf8 = TRUE) {
))
}
-#' Arrow CSV table reader
+#' Arrow CSV and JSON table readers
#'
-#' These methods wrap the Arrow C++ CSV table reader.
+#' These methods wrap the Arrow C++ CSV and JSON table readers.
#' For an interface to the CSV reader that's more familiar for R users, see
#' [read_csv_arrow()]
#'
#' @param file A character path to a local file, or an Arrow input stream
-#' @param read_options, see [csv_read_options()]
-#' @param parse_options, see [csv_parse_options()]
-#' @param convert_options, see [csv_convert_options()]
+#' @param read_options see [csv_read_options()]
+#' @param parse_options see [csv_parse_options()]
+#' @param convert_options see [csv_convert_options()]
#' @param ... additional parameters.
#'
-#' @return An `arrow::csv::TableReader` R6 object. Call `$Read()` on it to get
-#' an Arrow Table.
+#' @return An `arrow::csv::TableReader` or `arrow::json::TableReader` R6
+#' object. Call `$Read()` on it to get an Arrow Table.
#' @export
csv_table_reader <- function(file,
read_options = csv_read_options(),
diff --git a/r/R/feather.R b/r/R/feather.R
index 7877b4b..75ab610 100644
--- a/r/R/feather.R
+++ b/r/R/feather.R
@@ -41,9 +41,9 @@
)
)
-#' Create TableWriter that writes into a stream
+#' Create `TableWriter` that writes into a stream
#'
-#' @param stream an OutputStream
+#' @param stream an `OutputStream`
#'
#' @export
FeatherTableWriter <- function(stream) {
@@ -55,10 +55,10 @@ FeatherTableWriter <- function(stream) {
unique_ptr(`arrow::ipc::feather::TableWriter`, ipc___feather___TableWriter__Open(stream))
}
-#' Write data in the feather format
+#' Write data in the Feather format
#'
-#' @param data frame or arrow::RecordBatch
-#' @param stream A file path or an arrow::io::OutputStream
+#' @param data `data.frame` or `arrow::RecordBatch`
+#' @param stream A file path or an `arrow::io::OutputStream`
#'
#' @export
write_feather <- function(data, stream) {
@@ -72,12 +72,7 @@ write_feather.default <- function(data, stream) {
#' @export
write_feather.data.frame <- function(data, stream) {
- # splice the columns in the record_batch() call
- # e.g. if we had data <- data.frame(x = <...>, y = <...>)
- # then record_batch(!!!data) is the same as
- # record_batch(x = data$x, y = data$y)
- # see ?rlang::list2()
- write_feather(record_batch(!!!data), stream)
+ write_feather(record_batch(data), stream)
}
#' @method write_feather arrow::RecordBatch
@@ -86,8 +81,13 @@ write_feather.data.frame <- function(data, stream) {
write_feather_RecordBatch(data, stream)
}
-#' @rdname write_feather
+#' Write a record batch in the feather format
+#'
+#' @param data `data.frame` or `arrow::RecordBatch`
+#' @param stream A file path or an `arrow::io::OutputStream`
+#'
#' @export
+#' @keywords internal
write_feather_RecordBatch <- function(data, stream) {
UseMethod("write_feather_RecordBatch", stream)
}
@@ -118,10 +118,10 @@ write_feather_RecordBatch <- function(data, stream) {
ipc___TableWriter__RecordBatch__WriteFeather(FeatherTableWriter(stream), data)
}
-#' A arrow::ipc::feather::TableReader to read from a file
+#' A `arrow::ipc::feather::TableReader` to read from a file
#'
-#' @param file A file path, arrow::io::RandomAccessFile
-#' @param mmap Is the file memory mapped (applicable to the character and fs_path methods)
+#' @param file A file path or `arrow::io::RandomAccessFile`
+#' @param mmap Is the file memory mapped (applicable to the `character` and `fs_path` methods)
#' @param ... extra parameters
#'
#' @export
@@ -159,14 +159,14 @@ FeatherTableReader.fs_path <- function(file, mmap = TRUE, ...) {
file
}
-#' Read a feather file
+#' Read a Feather file
#'
-#' @param file a arrow::ipc::feather::TableReader or whatever the [FeatherTableReader()] function can handle
+#' @param file an `arrow::ipc::feather::TableReader` or whatever the [FeatherTableReader()] function can handle
#' @param col_select [tidy selection][tidyselect::vars_select()] of columns to read.
#' @param as_tibble should the [arrow::Table][arrow__Table] be converted to a tibble.
#' @param ... additional parameters
#'
-#' @return a data frame if `as_tibble` is `TRUE` (the default), or a [arrow::Table][arrow__Table] otherwise
+#' @return A `data.frame` if `as_tibble` is `TRUE` (the default), or a [arrow::Table][arrow__Table] otherwise
#'
#' @export
read_feather <- function(file, col_select = NULL, as_tibble = TRUE, ...){
diff --git a/r/R/json.R b/r/R/json.R
index 1409e31..647126d 100644
--- a/r/R/json.R
+++ b/r/R/json.R
@@ -27,7 +27,7 @@
#'
#' @section Methods:
#'
-#' - `Read()` : read the json file as an [arrow::Table][arrow__Table]
+#' - `Read()` : read the JSON file as an [arrow::Table][arrow__Table]
#'
#' @rdname arrow__json__TableReader
#' @name arrow__json__TableReader
@@ -40,11 +40,7 @@
`arrow::json::ReadOptions` <- R6Class("arrow::json::ReadOptions", inherit = `arrow::Object`)
`arrow::json::ParseOptions` <- R6Class("arrow::json::ParseOptions", inherit = `arrow::Object`)
-#' read options for the json reader
-#'
-#' @param use_threads Whether to use the global CPU thread pool
-#' @param block_size Block size we request from the IO layer; also determines the size of chunks when use_threads is `TRUE`. NB: if false, input must end with an empty line
-#'
+#' @rdname csv_read_options
#' @export
json_read_options <- function(use_threads = TRUE, block_size = 1048576L) {
shared_ptr(`arrow::json::ReadOptions`, json___ReadOptions__initialize(
@@ -55,14 +51,9 @@ json_read_options <- function(use_threads = TRUE, block_size = 1048576L) {
))
}
-#' Parsing options
-#'
-#' @param newlines_in_values Whether objects may be printed across multiple lines (for example pretty printed),
-#'
+#' @rdname csv_parse_options
#' @export
-json_parse_options <- function(
- newlines_in_values = FALSE
-){
+json_parse_options <- function(newlines_in_values = FALSE) {
shared_ptr(`arrow::json::ParseOptions`, json___ParseOptions__initialize(
list(
newlines_in_values = newlines_in_values
@@ -70,13 +61,7 @@ json_parse_options <- function(
))
}
-#' Json table reader
-#'
-#' @param file file
-#' @param read_options, see [json_read_options()]
-#' @param parse_options, see [json_parse_options()]
-#' @param ... additional parameters.
-#'
+#' @rdname csv_table_reader
#' @export
json_table_reader <- function(file,
read_options = json_read_options(),
@@ -142,17 +127,17 @@ json_table_reader.default <- function(file,
file
}
-#' Read json file into an arrow::Table
+#' Read a JSON file
#'
#' Use [arrow::json::TableReader][arrow__json__TableReader] from [json_table_reader()]
#'
-#' @param ... Used to construct an arrow::json::TableReader
-#' @param as_tibble convert the [arrow::Table][arrow__Table] to a data frame
-#' @param col_select [tidy selection][tidyselect::vars_select] of columns
+#' @inheritParams read_delim_arrow
+#' @param ... Additional options, passed to `json_table_reader()`
#'
+#' @return A `data.frame`, or an `arrow::Table` if `as_tibble = FALSE`.
#' @export
-read_json_arrow <- function(..., as_tibble = TRUE, col_select = NULL) {
- tab <- json_table_reader(...)$Read()$select(!!enquo(col_select))
+read_json_arrow <- function(file, col_select = NULL, as_tibble = TRUE, ...) {
+ tab <- json_table_reader(file, ...)$Read()$select(!!enquo(col_select))
if (isTRUE(as_tibble)) {
tab <- as.data.frame(tab)
diff --git a/r/R/parquet.R b/r/R/parquet.R
index fb7cc45..2647536 100644
--- a/r/R/parquet.R
+++ b/r/R/parquet.R
@@ -64,16 +64,17 @@
#' Create a new ArrowReaderProperties instance
#'
-#' @param use_threads use threads ?
+#' @param use_threads use threads?
#'
#' @export
-parquet_arrow_reader_properties <- function(use_threads = TRUE) {
+#' @keywords internal
+parquet_arrow_reader_properties <- function(use_threads = option_use_threads()) {
shared_ptr(`parquet::arrow::ArrowReaderProperties`, parquet___arrow___ArrowReaderProperties__Make(isTRUE(use_threads)))
}
-#' Create a FileReader instance
+#' Parquet file reader
#'
-#' @param file file
+#' @inheritParams read_delim_arrow
#' @param props reader file properties, as created by [parquet_arrow_reader_properties()]
#'
#' @param ... additional parameters
@@ -102,17 +103,15 @@ parquet_file_reader.character <- function(file, props = parquet_arrow_reader_pro
parquet_file_reader(fs::path_abs(file), props = parquet_arrow_reader_properties(), memory_map = memory_map, ...)
}
-#' Read Parquet file from disk
+#' Read a Parquet file
#'
#' '[Parquet](https://parquet.apache.org/)' is a columnar storage file format.
#' This function enables you to read Parquet files into R.
#'
+#' @inheritParams read_delim_arrow
#' @inheritParams parquet_file_reader
-#' @param as_tibble Should the [arrow::Table][arrow__Table] be converted to a
-#' tibble? Default is `TRUE`.
-#' @param col_select [tidy selection][tidyselect::vars_select] of columns to read
#'
-#' @return A [arrow::Table][arrow__Table], or a `tbl_df` if `as_tibble` is
+#' @return A [arrow::Table][arrow__Table], or a `data.frame` if `as_tibble` is
#' `TRUE`.
#' @examples
#'
@@ -121,7 +120,7 @@ parquet_file_reader.character <- function(file, props = parquet_arrow_reader_pro
#' }
#'
#' @export
-read_parquet <- function(file, props = parquet_arrow_reader_properties(), as_tibble = TRUE, col_select = NULL, ...) {
+read_parquet <- function(file, col_select = NULL, as_tibble = TRUE, props = parquet_arrow_reader_properties(), ...) {
reader <- parquet_file_reader(file, props = props, ...)
tab <- reader$ReadTable(!!enquo(col_select))
diff --git a/r/R/write_arrow.R b/r/R/write_arrow.R
index 486f361..08cc911 100644
--- a/r/R/write_arrow.R
+++ b/r/R/write_arrow.R
@@ -26,8 +26,7 @@ to_arrow <- function(x) {
# see ?rlang::list2()
`to_arrow.data.frame` <- function(x) table(!!!x)
-#' serialize an [arrow::Table][arrow__Table], an [arrow::RecordBatch][arrow__RecordBatch], or a
-#' data frame to either the streaming format or the binary file format
+#' Write Arrow formatted data
#'
#' @param x an [arrow::Table][arrow__Table], an [arrow::RecordBatch][arrow__RecordBatch] or a data.frame
#'
diff --git a/r/_pkgdown.yml b/r/_pkgdown.yml
index 648085b..552eff9 100644
--- a/r/_pkgdown.yml
+++ b/r/_pkgdown.yml
@@ -58,7 +58,6 @@ reference:
- csv_table_reader
- json_parse_options
- json_read_options
- - parquet_arrow_reader_properties
- json_table_reader
- parquet_file_reader
- title: Arrow data containers
diff --git a/r/man/FeatherTableReader.Rd b/r/man/FeatherTableReader.Rd
index 15a260b..452291e 100644
--- a/r/man/FeatherTableReader.Rd
+++ b/r/man/FeatherTableReader.Rd
@@ -2,17 +2,17 @@
% Please edit documentation in R/feather.R
\name{FeatherTableReader}
\alias{FeatherTableReader}
-\title{A arrow::ipc::feather::TableReader to read from a file}
+\title{A \code{arrow::ipc::feather::TableReader} to read from a file}
\usage{
FeatherTableReader(file, mmap = TRUE, ...)
}
\arguments{
-\item{file}{A file path, arrow::io::RandomAccessFile}
+\item{file}{A file path or \code{arrow::io::RandomAccessFile}}
-\item{mmap}{Is the file memory mapped (applicable to the character and fs_path methods)}
+\item{mmap}{Is the file memory mapped (applicable to the \code{character} and \code{fs_path} methods)}
\item{...}{extra parameters}
}
\description{
-A arrow::ipc::feather::TableReader to read from a file
+A \code{arrow::ipc::feather::TableReader} to read from a file
}
diff --git a/r/man/FeatherTableWriter.Rd b/r/man/FeatherTableWriter.Rd
index 3acf597..0db0a88 100644
--- a/r/man/FeatherTableWriter.Rd
+++ b/r/man/FeatherTableWriter.Rd
@@ -2,13 +2,13 @@
% Please edit documentation in R/feather.R
\name{FeatherTableWriter}
\alias{FeatherTableWriter}
-\title{Create TableWriter that writes into a stream}
+\title{Create \code{TableWriter} that writes into a stream}
\usage{
FeatherTableWriter(stream)
}
\arguments{
-\item{stream}{an OutputStream}
+\item{stream}{an \code{OutputStream}}
}
\description{
-Create TableWriter that writes into a stream
+Create \code{TableWriter} that writes into a stream
}
diff --git a/r/man/arrow__json__TableReader.Rd b/r/man/arrow__json__TableReader.Rd
index 58515a4..69b588f 100644
--- a/r/man/arrow__json__TableReader.Rd
+++ b/r/man/arrow__json__TableReader.Rd
@@ -11,7 +11,7 @@ class arrow::json::TableReader
\section{Methods}{
\itemize{
-\item \code{Read()} : read the json file as an \link[=arrow__Table]{arrow::Table}
+\item \code{Read()} : read the JSON file as an \link[=arrow__Table]{arrow::Table}
}
}
diff --git a/r/man/arrow_available.Rd b/r/man/arrow_available.Rd
index ea2c54a..9e696d5 100644
--- a/r/man/arrow_available.Rd
+++ b/r/man/arrow_available.Rd
@@ -15,3 +15,6 @@ library and then reinstall the R package. See \code{\link[=install_arrow]{instal
You won't generally need to call this function, but it's here in case it
helps for development purposes.
}
+\examples{
+arrow_available()
+}
diff --git a/r/man/csv_convert_options.Rd b/r/man/csv_convert_options.Rd
index 323c6e0..7d0e679 100644
--- a/r/man/csv_convert_options.Rd
+++ b/r/man/csv_convert_options.Rd
@@ -2,7 +2,7 @@
% Please edit documentation in R/csv.R
\name{csv_convert_options}
\alias{csv_convert_options}
-\title{Conversion Options for the csv reader}
+\title{Conversion options for the CSV reader}
\usage{
csv_convert_options(check_utf8 = TRUE)
}
@@ -10,5 +10,5 @@ csv_convert_options(check_utf8 = TRUE)
\item{check_utf8}{Whether to check UTF8 validity of string columns}
}
\description{
-Conversion Options for the csv reader
+Conversion options for the CSV reader
}
diff --git a/r/man/csv_parse_options.Rd b/r/man/csv_parse_options.Rd
index ac98262..17c5ba2 100644
--- a/r/man/csv_parse_options.Rd
+++ b/r/man/csv_parse_options.Rd
@@ -1,13 +1,16 @@
% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/csv.R
+% Please edit documentation in R/csv.R, R/json.R
\name{csv_parse_options}
\alias{csv_parse_options}
-\title{CSV parsing options}
+\alias{json_parse_options}
+\title{Parsing options for Arrow file readers}
\usage{
csv_parse_options(delimiter = ",", quoting = TRUE,
quote_char = "\\"", double_quote = TRUE, escaping = FALSE,
escape_char = "\\\\", newlines_in_values = FALSE,
ignore_empty_lines = TRUE, header_rows = 1L)
+
+json_parse_options(newlines_in_values = FALSE)
}
\arguments{
\item{delimiter}{Field delimiter}
@@ -29,5 +32,5 @@ csv_parse_options(delimiter = ",", quoting = TRUE,
\item{header_rows}{Number of header rows to skip (including the first row containing column names)}
}
\description{
-CSV parsing options
+Parsing options for Arrow file readers
}
diff --git a/r/man/csv_read_options.Rd b/r/man/csv_read_options.Rd
index 952138a..ddfc9d1 100644
--- a/r/man/csv_read_options.Rd
+++ b/r/man/csv_read_options.Rd
@@ -1,14 +1,20 @@
% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/csv.R
+% Please edit documentation in R/csv.R, R/json.R
\name{csv_read_options}
\alias{csv_read_options}
-\title{read options for the csv reader}
+\alias{json_read_options}
+\title{Read options for the Arrow file readers}
\usage{
-csv_read_options(block_size = 1048576L)
+csv_read_options(use_threads = option_use_threads(),
+ block_size = 1048576L)
+
+json_read_options(use_threads = TRUE, block_size = 1048576L)
}
\arguments{
-\item{block_size}{Block size we request from the IO layer; also determines the size of chunks when use_threads is \code{TRUE}}
+\item{use_threads}{Whether to use the global CPU thread pool}
+
+\item{block_size}{Block size we request from the IO layer; also determines the size of chunks when use_threads is \code{TRUE}. NB: if false, JSON input must end with an empty line}
}
\description{
-read options for the csv reader
+Read options for the Arrow file readers
}
diff --git a/r/man/csv_table_reader.Rd b/r/man/csv_table_reader.Rd
index 862aefb..1377a63 100644
--- a/r/man/csv_table_reader.Rd
+++ b/r/man/csv_table_reader.Rd
@@ -1,30 +1,34 @@
% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/csv.R
+% Please edit documentation in R/csv.R, R/json.R
\name{csv_table_reader}
\alias{csv_table_reader}
-\title{Arrow CSV table reader}
+\alias{json_table_reader}
+\title{Arrow CSV and JSON table readers}
\usage{
csv_table_reader(file, read_options = csv_read_options(),
parse_options = csv_parse_options(),
convert_options = csv_convert_options(), ...)
+
+json_table_reader(file, read_options = json_read_options(),
+ parse_options = json_parse_options(), ...)
}
\arguments{
\item{file}{A character path to a local file, or an Arrow input stream}
-\item{read_options, }{see \code{\link[=csv_read_options]{csv_read_options()}}}
+\item{read_options}{see \code{\link[=csv_read_options]{csv_read_options()}}}
-\item{parse_options, }{see \code{\link[=csv_parse_options]{csv_parse_options()}}}
+\item{parse_options}{see \code{\link[=csv_parse_options]{csv_parse_options()}}}
-\item{convert_options, }{see \code{\link[=csv_convert_options]{csv_convert_options()}}}
+\item{convert_options}{see \code{\link[=csv_convert_options]{csv_convert_options()}}}
\item{...}{additional parameters.}
}
\value{
-An \code{arrow::csv::TableReader} R6 object. Call \code{$Read()} on it to get
-an Arrow Table.
+An \code{arrow::csv::TableReader} or \code{arrow::json::TableReader} R6
+object. Call \code{$Read()} on it to get an Arrow Table.
}
\description{
-These methods wrap the Arrow C++ CSV table reader.
+These methods wrap the Arrow C++ CSV and JSON table readers.
For an interface to the CSV reader that's more familiar for R users, see
\code{\link[=read_csv_arrow]{read_csv_arrow()}}
}
diff --git a/r/man/json_parse_options.Rd b/r/man/json_parse_options.Rd
deleted file mode 100644
index c4c4636..0000000
--- a/r/man/json_parse_options.Rd
+++ /dev/null
@@ -1,14 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/json.R
-\name{json_parse_options}
-\alias{json_parse_options}
-\title{Parsing options}
-\usage{
-json_parse_options(newlines_in_values = FALSE)
-}
-\arguments{
-\item{newlines_in_values}{Whether objects may be printed across multiple lines (for example pretty printed),}
-}
-\description{
-Parsing options
-}
diff --git a/r/man/json_read_options.Rd b/r/man/json_read_options.Rd
deleted file mode 100644
index f2eb7bc..0000000
--- a/r/man/json_read_options.Rd
+++ /dev/null
@@ -1,16 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/json.R
-\name{json_read_options}
-\alias{json_read_options}
-\title{read options for the json reader}
-\usage{
-json_read_options(use_threads = TRUE, block_size = 1048576L)
-}
-\arguments{
-\item{use_threads}{Whether to use the global CPU thread pool}
-
-\item{block_size}{Block size we request from the IO layer; also determines the size of chunks when use_threads is \code{TRUE}. NB: if false, input must end with an empty line}
-}
-\description{
-read options for the json reader
-}
diff --git a/r/man/json_table_reader.Rd b/r/man/json_table_reader.Rd
deleted file mode 100644
index b2816c2..0000000
--- a/r/man/json_table_reader.Rd
+++ /dev/null
@@ -1,21 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/json.R
-\name{json_table_reader}
-\alias{json_table_reader}
-\title{Json table reader}
-\usage{
-json_table_reader(file, read_options = json_read_options(),
- parse_options = json_parse_options(), ...)
-}
-\arguments{
-\item{file}{file}
-
-\item{read_options, }{see \code{\link[=json_read_options]{json_read_options()}}}
-
-\item{parse_options, }{see \code{\link[=json_parse_options]{json_parse_options()}}}
-
-\item{...}{additional parameters.}
-}
-\description{
-Json table reader
-}
diff --git a/r/man/parquet_arrow_reader_properties.Rd b/r/man/parquet_arrow_reader_properties.Rd
index 6276d7f..eed7566 100644
--- a/r/man/parquet_arrow_reader_properties.Rd
+++ b/r/man/parquet_arrow_reader_properties.Rd
@@ -4,11 +4,12 @@
\alias{parquet_arrow_reader_properties}
\title{Create a new ArrowReaderProperties instance}
\usage{
-parquet_arrow_reader_properties(use_threads = TRUE)
+parquet_arrow_reader_properties(use_threads = option_use_threads())
}
\arguments{
-\item{use_threads}{use threads ?}
+\item{use_threads}{use threads?}
}
\description{
Create a new ArrowReaderProperties instance
}
+\keyword{internal}
diff --git a/r/man/parquet_file_reader.Rd b/r/man/parquet_file_reader.Rd
index 8cbe6b0..6c42855 100644
--- a/r/man/parquet_file_reader.Rd
+++ b/r/man/parquet_file_reader.Rd
@@ -2,17 +2,17 @@
% Please edit documentation in R/parquet.R
\name{parquet_file_reader}
\alias{parquet_file_reader}
-\title{Create a FileReader instance}
+\title{Parquet file reader}
\usage{
parquet_file_reader(file, props = parquet_arrow_reader_properties(), ...)
}
\arguments{
-\item{file}{file}
+\item{file}{A character path to a local file, or an Arrow input stream}
\item{props}{reader file properties, as created by \code{\link[=parquet_arrow_reader_properties]{parquet_arrow_reader_properties()}}}
\item{...}{additional parameters}
}
\description{
-Create a FileReader instance
+Parquet file reader
}
diff --git a/r/man/read_delim_arrow.Rd b/r/man/read_delim_arrow.Rd
index e1ca16f..ff732ae 100644
--- a/r/man/read_delim_arrow.Rd
+++ b/r/man/read_delim_arrow.Rd
@@ -63,7 +63,7 @@ A \code{data.frame}, or an \code{arrow::Table} if \code{as_tibble = FALSE}.
\description{
These functions uses the Arrow C++ CSV reader to read into a \code{data.frame}.
Arrow C++ options have been mapped to argument names that follow those of
-\code{\link[readr:read_delim]{readr::read_delim()}}, and \code{col_select} was inspired by \code{\link[vroom:vroom]{vroom::vroom()}}.
+\code{readr::read_delim()}, and \code{col_select} was inspired by \code{vroom::vroom()}.
}
\details{
\code{read_csv_arrow()} and \code{read_tsv_arrow()} are wrappers around
diff --git a/r/man/read_feather.Rd b/r/man/read_feather.Rd
index 0492cce..954ee92 100644
--- a/r/man/read_feather.Rd
+++ b/r/man/read_feather.Rd
@@ -2,12 +2,12 @@
% Please edit documentation in R/feather.R
\name{read_feather}
\alias{read_feather}
-\title{Read a feather file}
+\title{Read a Feather file}
\usage{
read_feather(file, col_select = NULL, as_tibble = TRUE, ...)
}
\arguments{
-\item{file}{a arrow::ipc::feather::TableReader or whatever the \code{\link[=FeatherTableReader]{FeatherTableReader()}} function can handle}
+\item{file}{an \code{arrow::ipc::feather::TableReader} or whatever the \code{\link[=FeatherTableReader]{FeatherTableReader()}} function can handle}
\item{col_select}{\link[tidyselect:vars_select]{tidy selection} of columns to read.}
@@ -16,8 +16,8 @@ read_feather(file, col_select = NULL, as_tibble = TRUE, ...)
\item{...}{additional parameters}
}
\value{
-a data frame if \code{as_tibble} is \code{TRUE} (the default), or a \link[=arrow__Table]{arrow::Table} otherwise
+A \code{data.frame} if \code{as_tibble} is \code{TRUE} (the default), or a \link[=arrow__Table]{arrow::Table} otherwise
}
\description{
-Read a feather file
+Read a Feather file
}
diff --git a/r/man/read_json_arrow.Rd b/r/man/read_json_arrow.Rd
index 75ccd69..57a73b1 100644
--- a/r/man/read_json_arrow.Rd
+++ b/r/man/read_json_arrow.Rd
@@ -2,16 +2,23 @@
% Please edit documentation in R/json.R
\name{read_json_arrow}
\alias{read_json_arrow}
-\title{Read json file into an arrow::Table}
+\title{Read a JSON file}
\usage{
-read_json_arrow(..., as_tibble = TRUE, col_select = NULL)
+read_json_arrow(file, col_select = NULL, as_tibble = TRUE, ...)
}
\arguments{
-\item{...}{Used to construct an arrow::json::TableReader}
+\item{file}{A character path to a local file, or an Arrow input stream}
-\item{as_tibble}{convert the \link[=arrow__Table]{arrow::Table} to a data frame}
+\item{col_select}{A \link[tidyselect:vars_select]{tidy selection specification}
+of columns, as used in \code{dplyr::select()}.}
-\item{col_select}{\link[tidyselect:vars_select]{tidy selection} of columns}
+\item{as_tibble}{Should the function return a \code{data.frame} or an
+\link[=arrow__Table]{arrow::Table}?}
+
+\item{...}{Additional options, passed to \code{json_table_reader()}}
+}
+\value{
+A \code{data.frame}, or an \code{arrow::Table} if \code{as_tibble = FALSE}.
}
\description{
Use \link[=arrow__json__TableReader]{arrow::json::TableReader} from \code{\link[=json_table_reader]{json_table_reader()}}
diff --git a/r/man/read_parquet.Rd b/r/man/read_parquet.Rd
index 145ef65..917acc0 100644
--- a/r/man/read_parquet.Rd
+++ b/r/man/read_parquet.Rd
@@ -2,25 +2,26 @@
% Please edit documentation in R/parquet.R
\name{read_parquet}
\alias{read_parquet}
-\title{Read Parquet file from disk}
+\title{Read a Parquet file}
\usage{
-read_parquet(file, props = parquet_arrow_reader_properties(),
- as_tibble = TRUE, col_select = NULL, ...)
+read_parquet(file, col_select = NULL, as_tibble = TRUE,
+ props = parquet_arrow_reader_properties(), ...)
}
\arguments{
-\item{file}{file}
+\item{file}{A character path to a local file, or an Arrow input stream}
-\item{props}{reader file properties, as created by \code{\link[=parquet_arrow_reader_properties]{parquet_arrow_reader_properties()}}}
+\item{col_select}{A \link[tidyselect:vars_select]{tidy selection specification}
+of columns, as used in \code{dplyr::select()}.}
-\item{as_tibble}{Should the \link[=arrow__Table]{arrow::Table} be converted to a
-tibble? Default is \code{TRUE}.}
+\item{as_tibble}{Should the function return a \code{data.frame} or an
+\link[=arrow__Table]{arrow::Table}?}
-\item{col_select}{\link[tidyselect:vars_select]{tidy selection} of columns to read}
+\item{props}{reader file properties, as created by \code{\link[=parquet_arrow_reader_properties]{parquet_arrow_reader_properties()}}}
\item{...}{additional parameters}
}
\value{
-A \link[=arrow__Table]{arrow::Table}, or a \code{tbl_df} if \code{as_tibble} is
+A \link[=arrow__Table]{arrow::Table}, or a \code{data.frame} if \code{as_tibble} is
\code{TRUE}.
}
\description{
diff --git a/r/man/write_arrow.Rd b/r/man/write_arrow.Rd
index 4296bcb..7169ece 100644
--- a/r/man/write_arrow.Rd
+++ b/r/man/write_arrow.Rd
@@ -2,8 +2,7 @@
% Please edit documentation in R/write_arrow.R
\name{write_arrow}
\alias{write_arrow}
-\title{serialize an \link[=arrow__Table]{arrow::Table}, an \link[=arrow__RecordBatch]{arrow::RecordBatch}, or a
-data frame to either the streaming format or the binary file format}
+\title{Write Arrow formatted data}
\usage{
write_arrow(x, stream, ...)
}
@@ -29,6 +28,5 @@ dispatch). \code{x} is serialized using the streaming format, i.e. using the
and \link[=arrow__ipc__RecordBatchStreamWriter]{arrow::ipc::RecordBatchStreamWriter} can be used for more flexibility.}
}
\description{
-serialize an \link[=arrow__Table]{arrow::Table}, an \link[=arrow__RecordBatch]{arrow::RecordBatch}, or a
-data frame to either the streaming format or the binary file format
+Write Arrow formatted data
}
diff --git a/r/man/write_feather.Rd b/r/man/write_feather.Rd
index f29554a..a427320 100644
--- a/r/man/write_feather.Rd
+++ b/r/man/write_feather.Rd
@@ -2,18 +2,15 @@
% Please edit documentation in R/feather.R
\name{write_feather}
\alias{write_feather}
-\alias{write_feather_RecordBatch}
-\title{Write data in the feather format}
+\title{Write data in the Feather format}
\usage{
write_feather(data, stream)
-
-write_feather_RecordBatch(data, stream)
}
\arguments{
-\item{data}{frame or arrow::RecordBatch}
+\item{data}{\code{data.frame} or \code{arrow::RecordBatch}}
-\item{stream}{A file path or an arrow::io::OutputStream}
+\item{stream}{A file path or an \code{arrow::io::OutputStream}}
}
\description{
-Write data in the feather format
+Write data in the Feather format
}
diff --git a/r/man/write_feather_RecordBatch.Rd b/r/man/write_feather_RecordBatch.Rd
new file mode 100644
index 0000000..b234f7f
--- /dev/null
+++ b/r/man/write_feather_RecordBatch.Rd
@@ -0,0 +1,17 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/feather.R
+\name{write_feather_RecordBatch}
+\alias{write_feather_RecordBatch}
+\title{Write a record batch in the feather format}
+\usage{
+write_feather_RecordBatch(data, stream)
+}
+\arguments{
+\item{data}{\code{data.frame} or \code{arrow::RecordBatch}}
+
+\item{stream}{A file path or an \code{arrow::io::OutputStream}}
+}
+\description{
+Write a record batch in the feather format
+}
+\keyword{internal}