You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by wj...@apache.org on 2022/12/27 21:13:03 UTC
[arrow] branch master updated: MINOR: [R] Update docs of DataType (#15011)
This is an automated email from the ASF dual-hosted git repository.
wjones127 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 b05865844d MINOR: [R] Update docs of DataType (#15011)
b05865844d is described below
commit b05865844d2d4bfce2a09377b27b63cb7b3bd9ad
Author: eitsupi <50...@users.noreply.github.com>
AuthorDate: Wed Dec 28 06:12:56 2022 +0900
MINOR: [R] Update docs of DataType (#15011)
Suggested by https://github.com/apache/arrow/issues/13803#issuecomment-1209245626
Add methods and active bindings that were not documented.
Authored-by: SHIMA Tatsuya <ts...@gmail.com>
Signed-off-by: Will Jones <wi...@gmail.com>
---
r/R/type.R | 11 +++++++++--
r/man/DataType.Rd | 12 +++++++++++-
r/man/data-type.Rd | 2 +-
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/r/R/type.R b/r/R/type.R
index ddd39e5c11..d1578dd822 100644
--- a/r/R/type.R
+++ b/r/R/type.R
@@ -22,12 +22,19 @@
#' @format NULL
#' @docType class
#'
-#' @section Methods:
+#' @section R6 Methods:
#'
#' - `$ToString()`: String representation of the DataType
#' - `$Equals(other)`: Is the DataType equal to `other`
#' - `$fields()`: The children fields associated with this type
+#' - `$code()`: Produces an R call of the data type.
+#'
+#' There are also some active bindings:
+#' - `$id`: integer Arrow type id.
+#' - `$name`: string Arrow type name.
+#' - `$num_fields`: number of child fields.
#'
+#' @seealso [infer_type()]
#' @rdname DataType
#' @name DataType
#' @seealso [`data-type`]
@@ -371,7 +378,7 @@ NestedType <- R6Class("NestedType", inherit = DataType)
#' @param ... For `struct()`, a named list of types to define the struct columns
#'
#' @name data-type
-#' @return An Arrow type object inheriting from DataType.
+#' @return An Arrow type object inheriting from [DataType].
#' @export
#' @seealso [dictionary()] for creating a dictionary (factor-like) type.
#' @examples
diff --git a/r/man/DataType.Rd b/r/man/DataType.Rd
index 7c0bb4ec97..b1539f9467 100644
--- a/r/man/DataType.Rd
+++ b/r/man/DataType.Rd
@@ -7,15 +7,25 @@
\description{
class arrow::DataType
}
-\section{Methods}{
+\section{R6 Methods}{
\itemize{
\item \verb{$ToString()}: String representation of the DataType
\item \verb{$Equals(other)}: Is the DataType equal to \code{other}
\item \verb{$fields()}: The children fields associated with this type
+\item \verb{$code()}: Produces an R call of the data type.
+}
+
+There are also some active bindings:
+\itemize{
+\item \verb{$id}: integer Arrow type id.
+\item \verb{$name}: string Arrow type name.
+\item \verb{$num_fields}: number of child fields.
}
}
\seealso{
+\code{\link[=infer_type]{infer_type()}}
+
\code{\link{data-type}}
}
diff --git a/r/man/data-type.Rd b/r/man/data-type.Rd
index cfb18aa8bc..9a2ddf5132 100644
--- a/r/man/data-type.Rd
+++ b/r/man/data-type.Rd
@@ -144,7 +144,7 @@ of digits after the decimal point. It can be negative.}
sorted.}
}
\value{
-An Arrow type object inheriting from DataType.
+An Arrow type object inheriting from \link{DataType}.
}
\description{
These functions create type objects corresponding to Arrow types. Use them