3.4 Summary

ds4psy: (3) Transforming data

This chapter introduced basic ways of data transformation using the tools provided by the dplyr package.

After working through this chapter, you should be able to use dplyr to:

  1. arrange cases (rows) based on one or more criteria;
  2. select cases (rows) and variables (columns) from a data table;
  3. change and create new variables;
  4. compute summary statistics over variables and grouped values;
  5. combine multiple commands into pipes to answer questions and create new data tables.

We only covered some essential dplyr commands. Take a look at the R Studio Cheat Sheet on data transformation to check which commands you are now familiar with and which others you can still discover in the future:

Data transformation with **dplyr** summary from [R Studio Cheat Sheets](https://www.rstudio.com/resources/cheatsheets/).

Figure 3.4: Data transformation with dplyr summary from R Studio Cheat Sheets.

Let’s test our knowledge and skills by completing the following exercises.