slice: Select rows by position

Description Usage Arguments Value See Also Examples

Description

This function is used to filter out everything except a specified subset of the data. The each parameter is used to change slice's behaviour to filter out all except a specified subset within each group or, if no grouping, within each node.

Usage

1
2
slice(.self, rows = NULL, start = NULL, end = NULL, each = FALSE,
  auto_compact = NULL)

Arguments

.self

Data frame

rows

Rows to select

start

Start of range of rows

end

End of range of rows

each

Apply slice to each cluster/group

auto_compact

Compact data

Value

Data frame

See Also

Other row manipulations: arrange, distinct, filter, group_by

Examples

1
2
3
4
5
dat <- Multiplyr (x=1:100, G=rep(c("A", "B", "C", "D"), each=25))
dat %>% group_by (G)
dat %>% slice (1:10, each=TRUE)
dat %>% slice (1:10)
dat %>% shutdown()

jeblundell/multiplyr documentation built on May 19, 2019, 12:39 a.m.