Skip to content

Commit

Permalink
MINOR: [R] [Docs] Fix link in ?cast documentation (apache#14455)
Browse files Browse the repository at this point in the history
Lead-authored-by: Bryce Mecum <[email protected]>
Co-authored-by: Nic Crane <[email protected]>
Signed-off-by: Nic Crane <[email protected]>
  • Loading branch information
amoeba and thisisnic authored Oct 20, 2022
1 parent d819622 commit edbfb2b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
9 changes: 5 additions & 4 deletions r/R/dplyr-funcs-type.R
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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, ...)
}
Expand Down
5 changes: 4 additions & 1 deletion r/R/type.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 8 additions & 2 deletions r/man/DataType.Rd

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

10 changes: 6 additions & 4 deletions r/man/cast.Rd

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

0 comments on commit edbfb2b

Please sign in to comment.