Module 12
June 19, 2023
After this training day, you will be:
read_*()
functionstidyverse
and tidyverse
verbs Break
Break
Break
Break
prenoms
database (provided as an R package)The following slides are remixed from original material by the awesome Olivier Gimenez available here under the CC BY 4.0 licence.
The material has been shortened to keep only selected slides and changed from xaringan to quarto format.
Ordocosme in 🇫🇷 with Tidy for “bien rangé” and verse for “univers”
A collection of R 📦 developed by H. Wickham and others at Rstudio
“A framework for managing data that aims at making the cleaning and preparing steps [muuuuuuuch] easier” (Julien Barnier).
Main characteristics of a tidy dataset:
#> # A tibble: 12 x 4
#> country year type count
#> <chr> <int> <chr> <int>
#> 1 Afghanistan 1999 cases 745
#> 2 Afghanistan 1999 population 19987071
#> 3 Afghanistan 2000 cases 2666
#> 4 Afghanistan 2000 population 20595360
#> 5 Brazil 1999 cases 37737
#> 6 Brazil 1999 population 172006362
#> # … with 6 more rows
Nope
No more
# Spread across two tibbles
# cases
#> # A tibble: 3 x 3
#> country `1999` `2000`
#> * <chr> <int> <int>
#> 1 Afghanistan 745 2666
#> 2 Brazil 37737 80488
#> 3 China 212258 213766
# population
#> # A tibble: 3 x 3
#> country `1999` `2000`
#> * <chr> <int> <int>
#> 1 Afghanistan 19987071 20595360
#> 2 Brazil 172006362 174504898
#> 3 China 1272915272 1280428583
Try again
Finally 🎉
Allows using a consistent format for which powerful tools work
Makes data manipulation pretty natural
Module 12 - Introduction à tidyverse