From the course: Cleaning Bad Data in R

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Variables, observations, and values

Variables, observations, and values

From the course: Cleaning Bad Data in R

Start my 1-month free trial

Variables, observations, and values

- Data sets come in many different forms. And our job is to transform them using the standardized principles of tidy data. Take a look at this data set that Hadley Wickham provided in his paper on tidy data. It describes the results of a medical experiment. In this experiment there were three different patients, John Smith, Jane Doe, and Mary Johnson. There were also two different treatment options, treatment A and treatment B. The experimenters tried both treatments with Jane, Mary and John. The results of all those treatments appear in this table which puts experiments in columns and people in rows. We could also take this same data and display it another way. This version of the table gives us the same results but puts people in columns and experiments in rows. This illustrates the need for tidy data. Both of these tables are correct, there isn't any data in here that's made up or erroneous but each table presents the data in different ways. Tidy data uses three different terms to…

Contents