(Builds on: Data basics)
(Leads to: Data structure basics, Exploratory data analysis (1D), Other single table verbs, Scoped verbs, Parsing basics, Pipes, Transformation functions, Window functions)
Some basic data manipulation is essential for many visualisations. Here
you’ll the learn the most important dplyr functions: filter()
,
mutate()
, and group_by()
+ summarise()
.
Don’t try and memorise the details of every verb, and the vector functions
that you might use with them. Instead, focus on the big picture, and make
sure you’ve familiarised yourself with the cheatsheet so that you can get
the details (with ?
) when you need them.
Skip through this chapter of R4DS focussing on filter()
, mutate()
and
group_by()
+ summarise()
.
Filter rows with filter() [r4ds-5.2]
Add new variables with mutate() [r4ds-5.5]
Grouped summaries with summarise() [r4ds-5.6]
Data Transformation Cheat Sheet [cheatsheets-data-transformation]. The cheatsheet includes a list of the most important summary functions. Refer to it when you forget.