Keeps the n (or prop fraction of) rows with the smallest order_by
values, as dplyr::slice_min() does. It runs on the GPU, ungrouped,
after group_by() and with by, when order_by is a column or an
expression mutate.tbl_gpu() runs on the GPU; any other order_by runs
in dplyr on the CPU (see cuplyr-fallback). Grouped results come group by
group, as for slice_head.tbl_gpu(): in ascending group-key order after
group_by(), and in the order each group first appears in .data with
by.
Usage
# S3 method for class 'tbl_gpu'
slice_min(
.data,
order_by,
...,
n,
prop,
by = NULL,
with_ties = TRUE,
na_rm = FALSE
)Arguments
- .data
A
tbl_gpuobject created bytbl_gpu().- order_by
Column, or expression of columns, to rank by.
- ...
Not used; for extensibility, must be empty.
- n, prop
As for
slice_head.tbl_gpu().- by
Optional grouping columns for this call only, run on the GPU; see
slice_head.tbl_gpu()'sby.- with_ties
If
TRUE(the default), ties at the cutoff are all kept (the result can have more thannrows); ifFALSE, ties are broken by original row position and the result has exactlynrows (or fewer if.datais smaller).- na_rm
If
FALSE(the default),NAvalues inorder_bysort last (for bothslice_min()andslice_max()) and can appear in the result oncen/propreaches past the non-NAcount. IfTRUE,NArows are always excluded.
