From the course: Learning the R Tidyverse

Unlock the full course today

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

Identify if data is wide or long

Identify if data is wide or long - R Tutorial

From the course: Learning the R Tidyverse

Start my 1-month free trial

Identify if data is wide or long

- [Instructor] The tidyverse was born from the development of the tidy R library which has a very specific and explicit definition of what tidy data looks like. In order to use the tidyverse well, actually almost at all, you will need to be able to identify whether your data is long or wide. Why? Well, because the tidy wants, expects and demands long formatted data. So, it's really important you can look at your data and say is this wide or is this long? Let's look at the difference between long and wide format data. In the exercise files for this video I have two Excel files I want to compare. One is called long and the other is wide. They both contain the same pretend dataset about the number of horses per 100 people in the US and the UK. Let's first look at the wide format data as it is how most people end up designing their Excel files. We have one thing we're measuring here, the number of horses per 100 people and a separate column for each year of data, so I have my country and…

Contents