TidyX Episode 121: Cleaning Research Data for Analysis – Viewer Question Answered

This week, Ellis Hughes and I work on cleaning some data for a research who messaged us asking about how to get a data set in a format that he can analyze. He created a file of some fake data that resembled the data that he received from practitioners working in various treatment centers. The data was in a very wide format, serial measurements going horizontally with one row per patient. To analyze such data the researcher required the data to be in a long format. However, this was trickier than just doing a simple pivot_longer() because there were multiple columns requiring pivoting. Ellis and I cover two different approaches to handling this issue, both resulting in the same final data set.

To watch the screen cast, CLICK HERE.

To access the data and our code, CLICK HERE.