Skip to content

WIP: [R] Verify CRAN release-20.0.0 #46325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions r/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@

# arrow 20.0.0

## Minor improvements and fixes

- Binary Arrays now inherit from `blob::blob` in addition to `arrow_binary` when
[converted to R
objects](https://arrow.apache.org/docs/r/articles/data_types.html#translations-from-arrow-to-r).
This change is the first step in eventually deprecating the `arrow_binary`
class in favor of the `blob` class in the
[`blob`](https://cran.r-project.org/package=blob) package (See
[GH-45709](https://github.com/apache/arrow/issues/45709)).

# arrow 19.0.1.1

## Minor improvements and fixes
Expand Down
32 changes: 25 additions & 7 deletions r/R/dplyr-funcs-agg.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,7 @@ register_bindings_aggregate <- function() {
options = list(skip_nulls = na.rm, min_count = 0L)
)
})
register_binding("arrow::one", function(...) {
set_agg(
fun = "one",
data = ensure_one_arg(list2(...), "one"),
options = list()
)
})
register_binding("arrow::one", one)
}

set_agg <- function(...) {
Expand Down Expand Up @@ -194,6 +188,30 @@ find_arrow_mask <- function() {
n <- n + 1
}
}
#' Get one value from each group
#'
#' Returns one arbitrary value from the input for each group. The function is
#' biased towards non-null values: if there is at least one non-null value for a
#' certain group, that value is returned, and only if all the values are null
#' for the group will the function return null.
#'
#' @param ... Unquoted column name to pull values from.
#'
#' @examples
#' \dontrun{
#' mtcars |>
#' arrow_table() |>
#' group_by(cyl) |>
#' summarize(x = one(disp))
#' }
#' @keywords internal
one <- function(...) {
set_agg(
fun = "one",
data = ensure_one_arg(list2(...), "one"),
options = list()
)
}

ensure_one_arg <- function(args, fun) {
if (length(args) == 0) {
Expand Down
7 changes: 4 additions & 3 deletions r/R/dplyr-funcs-doc.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#'
#' The `arrow` package contains methods for 37 `dplyr` table functions, many of
#' which are "verbs" that do transformations to one or more tables.
#' The package also has mappings of 212 R functions to the corresponding
#' The package also has mappings of 213 R functions to the corresponding
#' functions in the Arrow compute library. These allow you to write code inside
#' of `dplyr` methods that call R functions, including many in packages like
#' `stringr` and `lubridate`, and they will get translated to Arrow and run
Expand All @@ -42,7 +42,7 @@
#' * [`collect()`][dplyr::collect()]
#' * [`compute()`][dplyr::compute()]
#' * [`count()`][dplyr::count()]
#' * [`distinct()`][dplyr::distinct()]: `.keep_all = TRUE` not supported
#' * [`distinct()`][dplyr::distinct()]: `.keep_all = TRUE` returns a non-missing value if present, only returning missing values if all are missing.
#' * [`explain()`][dplyr::explain()]
#' * [`filter()`][dplyr::filter()]
#' * [`full_join()`][dplyr::full_join()]: the `copy` argument is ignored
Expand Down Expand Up @@ -83,7 +83,7 @@
#' Functions can be called either as `pkg::fun()` or just `fun()`, i.e. both
#' `str_sub()` and `stringr::str_sub()` work.
#'
#' In addition to these functions, you can call any of Arrow's 262 compute
#' In addition to these functions, you can call any of Arrow's 280 compute
#' functions directly. Arrow has many functions that don't map to an existing R
#' function. In other cases where there is an R function mapping, you can still
#' call the Arrow function directly if you don't want the adaptations that the R
Expand All @@ -96,6 +96,7 @@
#'
#' * [`add_filename()`][arrow::add_filename()]
#' * [`cast()`][arrow::cast()]
#' * [`one()`][arrow::one()]
#'
#' ## base
#'
Expand Down
9 changes: 0 additions & 9 deletions r/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# arrow <img src="https://arrow.apache.org/img/arrow-logo_hex_black-txt_white-bg.png" align="right" alt="" width="120" />

<!-- badges: start -->

[![cran](https://www.r-pkg.org/badges/version-last-release/arrow)](https://cran.r-project.org/package=arrow)
[![CI](https://github.com/apache/arrow/workflows/R/badge.svg?event=push)](https://github.com/apache/arrow/actions?query=workflow%3AR+branch%3Amain+event%3Apush)
[![R-universe status badge](https://apache.r-universe.dev/badges/arrow)](https://apache.r-universe.dev)
[![conda-forge](https://img.shields.io/conda/vn/conda-forge/r-arrow.svg)](https://anaconda.org/conda-forge/r-arrow)

<!-- badges: end -->

## Overview

The R `{arrow}` package provides access to many of the features of the [Apache Arrow C++ library](https://arrow.apache.org/docs/cpp/index.html) for R users. The goal of arrow is to provide an Arrow C++ backend to `{dplyr}`, and access to the Arrow C++ library through familiar base R and tidyverse functions, or `{R6}` classes. The dedicated R package website is located [here](https://arrow.apache.org/docs/r/index.html).
Expand Down
7 changes: 4 additions & 3 deletions r/man/acero.Rd

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

26 changes: 26 additions & 0 deletions r/man/one.Rd

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

Loading