sliceDS.Rd
DataSHIELD implentation of dplyr::slice
.
sliceDS(tidy_expr, df.name, .by, .preserve)
Provide either positive values to keep, or negative values to drop. The values provided must be either all positive or all negative. Indices beyond the number of rows in the input are silently ignored.
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr).
Optionally, a selection of columns to group by for just this operation, functioning as
an alternative to group_by
.
Relevant when the df.name input is grouped. If .preserve = FALSE (the default), the grouping structure is recalculated based on the resulting data, otherwise the grouping is kept as is.
An object of the same type as df.name
, typically a data frame or tibble.