Learn R Programming

multiplyr (version 0.1.1)

regroup: Return to grouped data

Description

After a data frame has been grouped and then ungrouped, this function acts as a shorthand (and faster way) to reinstate grouping.

Usage

regroup(.self, auto_partition = NULL)
groupwise(.self, auto_partition = NULL)

Arguments

.self
Data frame
auto_partition
Re-partition across cluster after operation

Value

Data frame

Examples

Run this code

dat <- Multiplyr (x=1:100, G=rep(c("A", "B"), length.out=100))
dat %>% group_by (G)
dat %>% ungroup() %>% regroup()
dat %>% summarise (N=length(x))
dat %>% shutdown()

Run the code above in your browser using DataLab