Skip to content
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

WIP: [R] Verify CRAN release 19.0.0 #45329

Open
wants to merge 4 commits into
base: maint-19.0.0
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions r/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@

# arrow 19.0.0

This release primarily updates the underlying Arrow C++ version used by the
package to 19.0.0. For what's changed in Arrow C++ 19.0.0, please see the [blog
post](https://arrow.apache.org/blog/2025/01/16/19.0.0-release/) and
[changelog](https://arrow.apache.org/release/19.0.0.html#changelog) for the
19.0.0 release.

# arrow 18.1.0

## Minor improvements and fixes
Expand Down
31 changes: 24 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,29 @@ 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))
#' }
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 271 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.

25 changes: 25 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