10 Grouped operations
Learning objectives
10.1 Context
We’ve done different types of operations, all on the entire data set. Sometimes there is structure within the data, such as different groups (e.g. genotypes, patient cohorts, geographical areas etc). We might then want information on a group-by-group basis.
10.2 Summary operations
10.2.1 Summarising data
LO: summarising data
10.2.2 Grouped summaries
LO: grouped summaries
10.3 Counting data
10.3.1 Counting
LO: counting
10.3.2 Counting by group
LO: counting data by group
10.3.3 Counting missing values
LO: counting with missing values
10.4 Grouped operations
10.4.1 Grouped filters
LO: grouped filters
10.4.2 Grouped changes
LO: grouped mutate
10.4.3 To ungroup or not ungroup
LO: the importance of ungrouping
10.5 Summary
Key points