Learn R Programming

multiplyr (version 0.1.1)

n: Number of items in current group

Description

Number of items in current group

Usage

n()

Arguments

Value

Number of items in current group (or node if ungrouped)

See Also

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

Examples

Run this code

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

Run the code above in your browser using DataLab