Learn R Programming

multiplyr (version 0.1.1)

n_groups: Return number of groups

Description

Return number of groups

Usage

n_groups(.self)

Arguments

.self
Data frame

Value

Number of groups in data frame

See Also

Other utility functions: between, cumall, cumany, cummean, distribute, first, lag, last, lead, n_distinct, nth, n

Examples

Run this code

dat <- Multiplyr (x=1:100, G=rep(1:4, each=25), cl=2)
dat %>% group_by (G)
n_groups (dat)
dat %>% shutdown()

Run the code above in your browser using DataLab