This is an automated email from the ASF dual-hosted git repository. kou pushed a commit to branch maint-10.0.x in repository https://gitbox.apache.org/repos/asf/arrow.git
commit 8d76062d451c6bc751c8a71cf6f34689ccb2240f Author: Bryce Mecum <petrid...@gmail.com> AuthorDate: Thu Oct 20 06:02:24 2022 -0800 MINOR: [R] [Docs] Fix link in ?cast documentation (#14455) Lead-authored-by: Bryce Mecum <petrid...@gmail.com> Co-authored-by: Nic Crane <thisis...@gmail.com> Signed-off-by: Nic Crane <thisis...@gmail.com> --- r/R/dplyr-funcs-type.R | 9 +++++---- r/R/type.R | 5 ++++- r/man/DataType.Rd | 10 ++++++++-- r/man/cast.Rd | 10 ++++++---- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index 296133daee..46720007dd 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -32,9 +32,9 @@ register_bindings_type <- function() { #' @param to [DataType] to cast to; for [Table] and [RecordBatch], #' it should be a [Schema]. #' @param safe logical: only allow the type conversion if no data is lost -#' (truncation, overflow, etc.). Default is `TRUE` +#' (truncation, overflow, etc.). Default is `TRUE`. #' @param ... specific `CastOptions` to set -#' @return an `Expression` +#' @return An [Expression] #' #' @examples #' \dontrun{ @@ -43,8 +43,9 @@ register_bindings_type <- function() { #' mutate(cyl = cast(cyl, string())) #' } #' @keywords internal -#' @seealso https://arrow.apache.org/docs/cpp/api/compute.html for the list of -#' supported CastOptions. +#' @seealso [`data-type`] for a list of [DataType] to be used with `to`. +#' @seealso [Arrow C++ CastOptions documentation](https://arrow.apache.org/docs/cpp/api/compute.html?highlight=castoptions#arrow%3A%3Acompute%3A%3ACastOptions) # nolint +#' for the list of supported CastOptions. cast <- function(x, to, safe = TRUE, ...) { x$cast(to, safe = safe, ...) } diff --git a/r/R/type.R b/r/R/type.R index 5089789f6c..cda606e3fa 100644 --- a/r/R/type.R +++ b/r/R/type.R @@ -24,10 +24,13 @@ #' #' @section Methods: #' -#' TODO +#' - `$ToString()`: String representation of the DataType +#' - `$Equals(other)`: Is the DataType equal to `other` +#' - `$fields()`: The children fields associated with this type #' #' @rdname DataType #' @name DataType +#' @seealso [`data-type`] DataType <- R6Class("DataType", inherit = ArrowObject, public = list( diff --git a/r/man/DataType.Rd b/r/man/DataType.Rd index 8c96141bed..7c0bb4ec97 100644 --- a/r/man/DataType.Rd +++ b/r/man/DataType.Rd @@ -9,7 +9,13 @@ class arrow::DataType } \section{Methods}{ - -TODO +\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 +} } +\seealso{ +\code{\link{data-type}} +} diff --git a/r/man/cast.Rd b/r/man/cast.Rd index 88134f2e02..6d87958376 100644 --- a/r/man/cast.Rd +++ b/r/man/cast.Rd @@ -13,12 +13,12 @@ cast(x, to, safe = TRUE, ...) it should be a \link{Schema}.} \item{safe}{logical: only allow the type conversion if no data is lost -(truncation, overflow, etc.). Default is \code{TRUE}} +(truncation, overflow, etc.). Default is \code{TRUE}.} \item{...}{specific \code{CastOptions} to set} } \value{ -an \code{Expression} +An \link{Expression} } \description{ This is a wrapper around the \verb{$cast()} method that many Arrow objects have. @@ -32,7 +32,9 @@ mtcars \%>\% } } \seealso{ -https://arrow.apache.org/docs/cpp/api/compute.html for the list of -supported CastOptions. +\code{\link{data-type}} for a list of \link{DataType} to be used with \code{to}. + +\href{https://arrow.apache.org/docs/cpp/api/compute.html?highlight=castoptions#arrow\%3A\%3Acompute\%3A\%3ACastOptions}{Arrow C++ CastOptions documentation} +for the list of supported CastOptions. } \keyword{internal}