Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

call_function

Call an Arrow compute function


Description

This function provides a lower-level API for calling Arrow functions by their string function name. You won't use it directly for most applications. Many Arrow compute functions are mapped to R methods, and in a dplyr evaluation context, all Arrow functions are callable with an arrow_ prefix.

Usage

call_function(
  function_name,
  ...,
  args = list(...),
  options = empty_named_list()
)

Arguments

function_name

string Arrow compute function name

...

Function arguments, which may include Array, ChunkedArray, Scalar, RecordBatch, or Table.

args

list arguments as an alternative to specifying in ...

options

named list of C++ function options.

Value

An Array, ChunkedArray, Scalar, RecordBatch, or Table, whatever the compute function results in.

See Also

Arrow C++ documentation for the functions and their respective options.

Examples

a <- Array$create(c(1L, 2L, 3L, NA, 5L))
s <- Scalar$create(4L)
call_function("fill_null", a, s)

a <- Array$create(rnorm(10000))
call_function("quantile", a, options = list(q = seq(0, 1, 0.25)))

arrow

Integration to 'Apache' 'Arrow'

v4.0.0.1
Apache License (>= 2.0)
Authors
Neal Richardson [aut, cre], Ian Cook [aut], Jonathan Keane [aut], Romain François [aut] (<https://orcid.org/0000-0002-2444-4226>), Jeroen Ooms [aut], Javier Luraschi [ctb], Jeffrey Wong [ctb], Apache Arrow [aut, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.