Skip to content

Data transformation and reading a file

Learning outcomes

  • Comfortable with the third chapter of R for Data Science
  • Can use the pipe operator
  • Can use a filter
  • Can use the logical equal operator
For teachers

Teaching goals are:

Prior question:

  • Which verbs do you associate with working with data?
  • What is tidy data?
  • What is a pipe?
  • When to use a pipe?
  • What is the different between = and ==?

Feedback questions:

  • What is tidy data?
  • What is a pipe?
  • When to use a pipe?
  • What is the different between = and ==?

Why data transformations are important

The dplyr logo

Whenever you have your raw data, this is rarely shown in a paper as-is. Instead, you will probably show only certain columns, or certain subsets, give average over categories, etc. All these things are called 'data transformations'.

Exercises

Exercise 1

Answers

See the answers here

Note that the answers use chapter 4.2.