![]() ![]() Right now we are going to use dplyr to wrangle this tidy-ish data set (the transform part of the cycle), and then come back to tidying messy data using tidyr once we’ve had some fun wrangling. When data are tidy, you are set up to work with it for your analyses, plots, etc. The Ocean Health Index dataset we were working with this morning was an example of tidy data. Tidy data has a simple convention: put variables in the columns and observations in the rows. Hadley Wickham, RStudio’s Chief Scientist, and his team have been building R packages for data wrangling and visualization based on the idea of tidy data. Whenever we use a function that is from the tidyverse, we will prefix it so you’ll know for sure. I like David Robinson’s blog post on the topic of teaching the tidyverse first.įor some things, base-R is more straight forward, and we’ll show you that too. We will also show you by comparison what code will look like in “Base R”, which means, in R without any additional packages (like the “tidyverse” package) installed. I find it to be a more straight-forward way to learn R. The tidyverse is a suite of packages that match a philosophy of data science developed by Hadley Wickham and the RStudio team. We are going to introduce you to data wrangling in R first with the tidyverse. It’s not data management or data manipulation: you keep the raw data raw and do these things programatically in R with the tidyverse. What are some common things you like to do with your data? Maybe remove rows or columns, do calculations and maybe add new columns? This is called data wrangling. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |