Repository navigation
Data Manipulation
Page Editor: @paigemiller
To request edits to this page, open an issue, and tag @paigemiller
You have a data set and you want to get started summarizing, plotting, analyzing, and modeling... What should we be keeping in mind with respect to the process? Hopefully this section will point us to links for specific data manipulation tasks that we encounter from time to time.
Hadley Wickham, developer of R packages like reshape, ggplot2, stringr, and probably others, has advocated for scientists to strive for "tidy" data. He says, "Tidy datasets are all alike but every messy dataset is messy in its own way". Here's a link to his paper on Tidy Data and here is a tutorial on data tidying. Tidy data make summarizing, data visualization, and analysis much friendlier.
Which R packages help you make Tidy Data?
-
[magrittr](http://blog.revolutionanalytics.com/2014/07/magrittr-simplifying-r-code-with-pipes.html)-- piping functions to simplify and make code easier to read. For examplemy.data %>% my.functionis the same asmy.function(my.data) -
dplyr-- relevant functions/links -
tidyr--
Note that you can save intermediate data cleaning steps, or you can clean as you as part of the data management process. Either is fine. See Good Enough Practices for a discussion.
A summary of the rules below were designed in collaboration with the R user community at Google.
- journal-club doc
- google-sites lab manual
- index of all Drake-lab google sites
- lab-meeting--minutes doc Contact John if you are having trouble accessing google docs or websites.
- repository of public domain images