
Split a GPU table into one GPU table per group (dplyr backend method)
Source:R/fallback.R
group_split.tbl_gpu.Rddplyr::group_split() on a tbl_gpu runs on the GPU. It groups by ...
(or uses the existing groups), finds the rows of each group (groups in
sorted key order, NA last, as group_data() gives them, empty groups
included), puts the rows in group order and cuts the table into one piece
per group. The pieces are tbl_gpu tables, as dplyr's pieces have the
class of the ungrouped input, and the list_of prototype is a 0-row
tbl_gpu. A table left with no columns (every column dropped by .keep = FALSE) runs in dplyr on the CPU.
Usage
# S3 method for class 'tbl_gpu'
group_split(.tbl, ..., .keep = TRUE, keep = lifecycle::deprecated())Arguments
- .tbl
A tbl.
- ...
If
.tblis an ungrouped data frame, a grouping specification, forwarded togroup_by().- .keep
Should the grouping columns be kept?
- keep
Defunct, use
.keep.
Value
A vctrs::list_of() of tbl_gpu tables.