Tidyverse

This is really just amusement but largely switching the way I use R from “base/standard R” to using the tidyverse has been a real education for me and has made it much easier for me to handle complex multilevel data from services.

Details #

Tidyverse is a mix of a philosophy about trying to coerce your data into “tidy” format and a lot of tools in the shape of R functions in a lot of R packages (the main ones are pulled into an umbrella package “tidyverse” so using library(tidyverse) gets you all of those. In many ways “tidy” data is just rectangular data tables but this isn’t about restricting you to that rectangular model in the way that, say, SPSS tends to, it’s about understanding some simple principles actually, for me, largely about handling data that is far more messy than tidy but having a set of tools and a way of thinking that helps me do that well. There are parallels with languages like SQL (Structured Query Language) designed to handle RDBMS data but I find the tidyverse language structure far easier to remember and use than SQL.

The other great strength of tidyverse is that it’s closely linked with the ggplot2 package which again has a quite a learning curve as you switch from traditional ways of creating graphics and plots to the “grammar of graphics” created by Leland Wilkinson. “Grammar of Graphics” gave us the “gg” in the ggplot2 package and ggplot() function).

Try also #

Dataset and database
Multi-level modelling
Nested data, nesting
RDBMS: Relational Database Management Systems
Rectangular data
SPSS

Chapters #

Not in the OMbook!

Online resources #

Rblog posts:
* Why pipe? Why tidyverse?
* More piping and rowwise()

Dates #

First created 2.v.24.

Powered by BetterDocs