Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

Functions available in Arrow dplyr queries

Source:R/dplyr-funcs-doc.R
acero.Rd

Thearrow package contains methods for 37dplyr table functions, many ofwhich are "verbs" that do transformations to one or more tables.The package also has mappings of 223 R functions to the correspondingfunctions in the Arrow compute library. These allow you to write code insideofdplyr methods that call R functions, including many in packages likestringr andlubridate, and they will get translated to Arrow and runon the Arrow query engine (Acero). This document lists all of the mappedfunctions.

dplyr verbs

Most verb functions return anarrow_dplyr_query object, similar in spiritto adbplyr::tbl_lazy. This means that the verbs do not eagerly evaluatethe query on the data. To run the query, call eithercompute(),which returns anarrowTable, orcollect(), which pulls the resultingTable into an Rtibble.

Function mappings

In the list below, any differences in behavior or support between Acero andthe R function are listed. If no notes follow the function name, then youcan assume that the function works in Acero just as it does in R.

Functions can be called either aspkg::fun() or justfun(), i.e. bothstr_sub() andstringr::str_sub() work.

In addition to these functions, you can call any of Arrow's 281 computefunctions directly. Arrow has many functions that don't map to an existing Rfunction. In other cases where there is an R function mapping, you can stillcall the Arrow function directly if you don't want the adaptations that the Rmapping has that make Acero behave like R. These functions are listed in theC++ documentation, andin the function registry in R, they are named with anarrow_ prefix, suchasarrow_ascii_is_decimal.

arrow

base

bit64

dplyr

hms

  • as_hms(): subsecond precision not supported for character input

  • hms(): nanosecond times not supported

lubridate

methods

rlang

stats

  • median(): approximate median (t-digest) is computed

  • quantile():probs must be length 1;approximate quantile (t-digest) is computed

  • sd()

  • var()

stringi

stringr

Pattern modifierscoll() andboundary() are not supported in any functions.

tibble

tidyselect


[8]ページ先頭

©2009-2025 Movatter.jp