3. Reproducible Science
This section includes background on:
Motivating scenario: You are conducting a scientific research project and want to make sure that your project is reliable and repeatable.
Learning goals: By the end of this chapter you should be able to
- Make a data sheet.
- Label samples.
- Describe best practices for collecting, storing, and maintaining data.
- Organize data in folders.
- Load data into R using a project
- Write code that allows for readers to understand, replicate, and extend your work.
- Researchers can build trust with the public and other scientists by making the entire scientific process transparent.
- Scientists can build upon their own work and that of others without having to dig through old notes or rely on the memory of a busy colleague to reconstruct past analyses.
- Others can assess how sensitive a result is to specific assumptions and decisions.
In my roles as a biostatistics professor and Data Editor at The American Naturalist, I have found that the greatest beneficiary of reproducible research is often the lead author themselves. In this chapter, we will work through the process of creating reproducible research—from collecting data in the field to writing and sharing R scripts that document your analyses.
The best time to make your research reproducible is while planning your project. The second best time is now.
Making science reproducible
Here, I present a soup-to-nuts breakdown of how to conduct a reproducible research project. I first introduce how to appropriately collect and enter/save data and then how to safely store data. Then, I introduce how to handle your data in R, from loading the data into R, to having a look at the data, and preparing it for analysis, all while making sure your code follows best practices in reproducibility.