sliceDS {dsTidyverse} | R Documentation |
Subset rows using their positions
Description
DataSHIELD implentation of dplyr::slice
.
Usage
sliceDS(tidy_expr, df.name, .by, .preserve)
Arguments
tidy_expr |
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. |
df.name |
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). |
.by |
Optionally, a selection of columns to group by for just this operation, functioning as
an alternative to |
.preserve |
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. |
Value
An object of the same type as df.name
, typically a data frame or tibble.
[Package dsTidyverse version 1.0.4 Index]