layout: true
knitr::opts_chunk$set(echo = TRUE, message = FALSE, error = FALSE, warning = FALSE) # These are the defaults xaringanExtra::use_extra_styles( hover_code_line = TRUE, #<< mute_unhighlighted_code = TRUE #<< ) library(knitr) library(tidyquintro)
Introduction to tidyverse concepts (15 minutes)
Tidy data wrangling - with translations to base-R (~ 2 hours)
|>
(~10 min) adding and altering variables with dplyr (~25 min)
Lunch break (30 min)
Tidy data reshaping & summaries - avoiding loops (~ 1.5 hours)
background-image: url(img/hex_yes.png) background-size: 15% background-position: 37% 20%
.pull-left[
|Package|Functions|
|------|--------|
| dplyr | data manipulation - altering and adding variables in a dataset |
| tidyr | data tidying - changing data shape and structure |
| ggplot2 | data visualisation |
| purrr | Enhancements on functional programming |
]
background-image: url(img/hex_yes.png), url(img/hex_not.png) background-size: 15% background-position: 37% 20%, 90% 20%
.pull-left[
|Package|Functions|
|------|--------|
| dplyr | data manipulation - altering and adding variables in a dataset |
| tidyr | data tidying - changing data shape and structure |
| ggplot2 | data visualisation |
| purrr | Enhancements on functional programming |
]
.pull-right[
|Package|Functions|
|------|--------|
| readr | easy and fast importing of data |
| tibble | variations on the R data.frame |
| forcats | working with factors/categorical data |
| stringr | working with strings/characters |
]
background-image: url(img/dplyr.png) background-size: 8% background-position: 95% 5%
.pull-left[ provides a consistent set of verbs that help you solve the most common data manipulation challenges:
select()
picks variables based on their names. filter()
picks cases based on their values. mutate()
- adds or alters variables that are functions of existing variables summarise()
reduces multiple values down to a single summary. arrange()
changes the ordering of the rows. .pull-right[ Combined with functions like
group_by()
- Group the data set by variables nest_by()
- Nest data by columns across
- Apply functions across multiple columns
Tidy-selectors like:
- contains()
- select by variables containing a string
- starts_with()
- select by variables starting with a string
- ends_with()
- select by variables ending with a string
]
class: right background-image: url(img/hexs.png) background-size: contain
follow me: @DrMowinckels
Read my blog: DrMowinckels.io
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.