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.
anti_join(): thecopyargument is ignoreddistinct():.keep_all = TRUEreturns a non-missing value if present, only returning missing values if all are missing.full_join(): thecopyargument is ignoredinner_join(): thecopyargument is ignoredleft_join(): thecopyargument is ignoredpull(): thenameargument is not supported; returns an R vector by default but this behavior is deprecated and will return an ArrowChunkedArray in a future release. Provideas_vector = TRUE/FALSEto control this behavior, or setoptions(arrow.pull_as_vector)globally.right_join(): thecopyargument is ignoredsemi_join(): thecopyargument is ignoredslice_head(): slicing within groups not supported; Arrow datasets do not have row order, so head is non-deterministic;proponly supported on queries wherenrow()is knowable without evaluatingslice_max(): slicing within groups not supported;with_ties = TRUE(dplyr default) is not supported;proponly supported on queries wherenrow()is knowable without evaluatingslice_min(): slicing within groups not supported;with_ties = TRUE(dplyr default) is not supported;proponly supported on queries wherenrow()is knowable without evaluatingslice_sample(): slicing within groups not supported;replace = TRUEand theweight_byargument not supported;nonly supported on queries wherenrow()is knowable without evaluatingslice_tail(): slicing within groups not supported; Arrow datasets do not have row order, so tail is non-deterministic;proponly supported on queries wherenrow()is knowable without evaluatingsummarise(): window functions not currently supported; arguments.drop = FALSEand.groups = "rowwise"not supported
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.
base
as.Date(): MultipletryFormatsnot supported in Arrow.Consider using the lubridate specialised parsing functionsymd(),ymd(), etc.as.difftime(): only supportsunits = "secs"(the default)data.frame():row.namesandcheck.rowsarguments not supported;stringsAsFactorsmust beFALSEdifftime(): only supportsunits = "secs"(the default);tzargument not supportednchar():allowNA = TRUEandkeepNA = TRUEnot supportedpaste(): thecollapseargument is not yet supportedpaste0(): thecollapseargument is not yet supportedstrptime(): accepts aunitargument not present in thebasefunction.Valid values are "s", "ms" (default), "us", "ns".substr():startandstopmust be length 1
dplyr
case_when():.ptypeand.sizearguments not supported
lubridate
dmy():localeargument not supporteddmy_h():localeargument not supporteddmy_hm():localeargument not supporteddmy_hms():localeargument not supporteddpicoseconds(): not supporteddym():localeargument not supportedfast_strptime(): non-default values ofltandcutoff_2000not supportedforce_tz(): Timezone conversion from non-UTC timezone not supported;roll_dstvalues of 'error' and 'boundary' are supported for nonexistent times,roll_dstvalues of 'error', 'pre', and 'post' are supported for ambiguous times.make_datetime(): only supports UTC (default) timezonemake_difftime(): only supportsunits = "secs"(the default);providing bothnumand...is not supportedmdy():localeargument not supportedmdy_h():localeargument not supportedmdy_hm():localeargument not supportedmdy_hms():localeargument not supportedmy():localeargument not supportedmyd():localeargument not supportedparse_date_time():quiet = FALSEis not supportedAvailable formats are H, I, j, M, S, U, w, W, y, Y, R, T.On Linux and OS X additionally a, A, b, B, Om, p, r are available.ydm():localeargument not supportedydm_h():localeargument not supportedydm_hm():localeargument not supportedydm_hms():localeargument not supportedym():localeargument not supportedymd():localeargument not supportedymd_h():localeargument not supportedymd_hm():localeargument not supportedymd_hms():localeargument not supportedyq():localeargument not supported
stats
median(): approximate median (t-digest) is computedquantile():probsmust be length 1;approximate quantile (t-digest) is computed
stringr
Pattern modifierscoll() andboundary() are not supported in any functions.
str_c(): thecollapseargument is not yet supportedstr_count():patternmust be a length 1 character vectorstr_split(): Case-insensitive string splitting and splitting into 0 parts not supportedstr_sub():startandendmust be length 1