This is an automated email from the ASF dual-hosted git repository.
npr 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 663dc325de MINOR: [R] Clarify read_json_arrow() docs
663dc325de is described below
commit 663dc325de1176a5caf32809942acae98abf7a8b
Author: Edward Visel <[email protected]>
AuthorDate: Wed May 18 15:30:54 2022 -0700
MINOR: [R] Clarify read_json_arrow() docs
A quick PR to clarify `read_json_arrow()` docs I found confusing while
benchmarking. Specifically, specifies the function
- is for ndjson (as opposed to say the many json formats to which pandas
can write a dataframe)
- handles compression
- handles implicit and explicit nulls (was in the example, but not
previously stated)
Open to changes, but do feel these docs need to at least explicitly say
"ndjson" somewhere.
Closes #13133 from alistaire47/chore/read-json-docs
Lead-authored-by: Edward Visel
<[email protected]>
Co-authored-by: Neal Richardson <[email protected]>
Signed-off-by: Neal Richardson <[email protected]>
---
r/R/json.R | 6 +++++-
r/man/read_json_arrow.Rd | 7 ++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/r/R/json.R b/r/R/json.R
index 08798bb2e5..19cf6a9299 100644
--- a/r/R/json.R
+++ b/r/R/json.R
@@ -17,7 +17,11 @@
#' Read a JSON file
#'
-#' Using [JsonTableReader]
+#' Wrapper around [JsonTableReader] to read a newline-delimited JSON (ndjson)
file into a
+#' data frame or Arrow Table.
+#'
+#' If passed a path, will detect and handle compression from the file extension
+#' (e.g. `.json.gz`). Accepts explicit or implicit nulls.
#'
#' @inheritParams read_delim_arrow
#' @param schema [Schema] that describes the table.
diff --git a/r/man/read_json_arrow.Rd b/r/man/read_json_arrow.Rd
index 610867ca40..2ad600725f 100644
--- a/r/man/read_json_arrow.Rd
+++ b/r/man/read_json_arrow.Rd
@@ -36,7 +36,12 @@ an Arrow \link{Table}?}
A \code{data.frame}, or a Table if \code{as_data_frame = FALSE}.
}
\description{
-Using \link{JsonTableReader}
+Wrapper around \link{JsonTableReader} to read a newline-delimited JSON
(ndjson) file into a
+data frame or Arrow Table.
+}
+\details{
+If passed a path, will detect and handle compression from the file extension
+(e.g. \code{.json.gz}). Accepts explicit or implicit nulls.
}
\examples{
\dontshow{if (arrow_with_json()) (if (getRversion() >= "3.4") withAutoprint
else force)(\{ # examplesIf}