An R reproducibility toolkit for the practical researcher https://reproducibility.rocks/ Recent content on An R reproducibility toolkit for the practical researcher Hugo -- gohugo.io en Tue, 15 Mar 2022 00:00:00 +0000 01: here are the portable paths https://reproducibility.rocks/materials/day2/01-here/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day2/01-here/ If you use RStudio Projects consistently, you can be sure that your working directory is always the root of the project unless you actively change it. Almost. There are two situations in which this assumption can be broken and that can lead to errors or, even worse, surprising results. Root directory during knit One issue is that when RMarkdown files are knitted, the working directory in which the code is executed is the location of the . 01: Managing R dependencies with renv https://reproducibility.rocks/materials/day3/01-renv/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day3/01-renv/ No code is its own isolated bubble. Almost every analysis will depend on a number of external packages, such as ggplot2 for plotting, data.table for data wrangling, knitr for rendering a report, and so on. But actively-maintained packages will change their code-base to fix bugs, add or remove features, or change behaviour. These changes can potentially break your analysis or create subtle (or not so subtle) differences in the result. 01: Reproducible computational environment with Docker https://reproducibility.rocks/materials/day4/01-docker/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day4/01-docker/ While renv is nice, it doesn’t solve the whole problem, because system dependencies and even the R version itself can change. Another issue is that downloading and installing all the R packages can take a while. Like an hour or more. This is not a deal-breaker, but it' be great to do better. People trying to reproduce work are few and far between, so it’s important to make their lives as easy as possible. 01: What is reproducibilty anyway? https://reproducibility.rocks/materials/day1/01-introduction/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day1/01-introduction/ This workshop will introduce some useful tools to help you write code that can be run anywhere with consistent results. We will focus on the practical aspects of reproducibility, but it’s still worth it to get some sense of what is reproducibility and what’s its aim. What reproducibility is and what it is not We will use “reproducibility” to talk about results that can be obtained by someone else given the same data and code. Day 0 https://reproducibility.rocks/materials/day0/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day0/ Hi! In this workshop we will be introducing in many tools to help make your work as reproducible as possible. That means that you’ll need to have several programs installed and set up before we begin. Please, follow these instructions before the workshop. R At the very least you need to have R installed on your computer. If possible, try to have it upgraded to the latest version. We developed the materials using R version 4. 02: A tidy project is a happy project https://reproducibility.rocks/materials/day1/02-projects/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day1/02-projects/ Imagine that you read some interesting paper or analysis. To your delight, all the code and data is available in a public repository. You then are itching to sink your teeth on it; to see how they implemented the methods, or to run it with your own similar data. You download the all the files and you find something like this. /home/dorothy/Documents/paper ├── abstract.R ├── correlation.png ├── data.csv ├── data2.csv ├── fig1. 02: Getting the most of git https://reproducibility.rocks/materials/day2/02-git/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day2/02-git/ Why git? Do you have something like this in your computer? /home/pao/Documents/thesis ├── abstract.R ├── thesis.Rmd ├── thesis_reviwed.Rmd ├── thesis_reviwed2.Rmd ├── thesis_final.Rmd ├── thesis_finalfinal.Rmd ├── this_is_it.Rmd ├── now_this_is_it_for_real_this_time_i_swear.Rmd └── FINAL.Rmd Probably we all have, or had something like this at one point because we didn’t use a version control system. Version control systems manage the evolution and changes of a set of files that we’ll call repository. 02: Sharing data https://reproducibility.rocks/materials/day3/02-data/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day3/02-data/ The two ingredients for a reproducible project are code and data. We talked a lot about how to organise and share code, but what about data? Sharing data is far from trivial and there are a lot of things to consider. Permissions Before the technical issues of sharing data there are the bureaucratic issues. Depending on your context, you might not be allowed to share your data. Elio Campitelli https://reproducibility.rocks/people/eliocampitelli/ Mon, 01 Jan 0001 00:00:00 +0000 https://reproducibility.rocks/people/eliocampitelli/ I have aPh.D. from the University of Buenos Aires in atmospheric sciences and I’m an R package developer. I apply open science principles with a strong emphasis on reproducibility by publicly making all the code and data available. I’m a founding member of the R User Group in Buenos Aires and the LatinR conference. I maintain several open-source R packages (e.g., ggnewscale; metR) and contribute to other packages, such as data. Paola Corrales https://reproducibility.rocks/people/paocorrales/ Mon, 01 Jan 0001 00:00:00 +0000 https://reproducibility.rocks/people/paocorrales/ I have a PhD from the University of Buenos Aires. I study atmospheric sciences applying data assimilation techniques to improve short-term forecasts of severe events in Argentina. Also, I’m a Trainer and instructor for The Carpentries and an RStudio certified instructor. I’m also part of Expedition Science, an Argentina-based NPO, where she leads educational projects such as science camps and workshops for students and K-12 science teachers. I’m a professor at the Data Sciences degree at Austral University. 03: Reporting with R Markdown https://reproducibility.rocks/materials/day1/03-rmarkdown/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day1/03-rmarkdown/ R Markdown files An R Markdown file is a plain text file, with some rules and special syntax that allow you to write code and text together. When it is “knitted,” the code will be evaluated and executed and the text formatted so that it creates a reproducible report or document that is nice to read and contains all your work. This is really critical to reproducibility since it automates the creation of a paper or report, which also has the side effect of saving time. 03: Research compendia with rrtools https://reproducibility.rocks/materials/day2/03-rrtools/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/day2/03-rrtools/ Of course, you can always create a file structure that suits you and your work by hand. But if you are going to do that a lot, it might be nice to automate some of the work. We are going to use the rrtools package to create a “research compendium” using a couple of R functions and combine it with the things we learned on the git and GitHub section. Mini Reprohack https://reproducibility.rocks/materials/reprohack/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/reprohack/ One of the best ways of learning what makes a reproducible project is to try to reproduce real life projects instead of toy examples. You’ll quickly learn what works and what doesn’t and pick up tools and workflows from others. Therefore we propose this optional homework in which you will do just that. You can do it at any moment during the workshop. Some papers require using particular packages or technologies that you might not be familiar at the start of the workshop. Extras https://reproducibility.rocks/materials/extras/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/extras/ The terminal If you use macOS or any flavour of Linux, the terminal will sound familiar. If you live in the Windows world, the terminal may be new to you. But you don’t need another workshop to work with it in the context of this workshop. For now you can use the terminal tab in RStudio or look for the Command Prompt in the list of programs you have installed. Clementina https://reproducibility.rocks/people/clementina/ Mon, 01 Jan 0001 00:00:00 +0000 https://reproducibility.rocks/people/clementina/ wsagjkfytiuiuu xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgh kjhgggggggggggggggggggggggggghjhgklgkjhg David https://reproducibility.rocks/people/david/ Mon, 01 Jan 0001 00:00:00 +0000 https://reproducibility.rocks/people/david/ as345trbwetrsdvfasfs sret sertgfddddddddddddddddddddddddg s4tsdffffffffffg sfdg sdfg https://reproducibility.rocks/materials/slides/day1/index_files/libs/revealjs/plugin/notes/speaker-view/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/slides/day1/index_files/libs/revealjs/plugin/notes/speaker-view/ reveal.js - Speaker View body { font-family: Helvetica; font-size: 18px; } #current-slide, #upcoming-slide, #speaker-controls { padding: 6px; box-sizing: border-box; -moz-box-sizing: border-box; } #current-slide iframe, #upcoming-slide iframe { width: 100%; height: 100%; border: 1px solid #ddd; } #current-slide .label, #upcoming-slide .label { position: absolute; top: 10px; left: 10px; z-index: 2; } #connection-status { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; padding: 30% 20% 20% 20%; font-size: 18px; color: #222; background: #fff; text-align: center; box-sizing: border-box; line-height: 1. https://reproducibility.rocks/materials/slides/day2/index_files/libs/revealjs/plugin/notes/speaker-view/ Tue, 15 Mar 2022 00:00:00 +0000 https://reproducibility.rocks/materials/slides/day2/index_files/libs/revealjs/plugin/notes/speaker-view/ reveal.js - Speaker View body { font-family: Helvetica; font-size: 18px; } #current-slide, #upcoming-slide, #speaker-controls { padding: 6px; box-sizing: border-box; -moz-box-sizing: border-box; } #current-slide iframe, #upcoming-slide iframe { width: 100%; height: 100%; border: 1px solid #ddd; } #current-slide .label, #upcoming-slide .label { position: absolute; top: 10px; left: 10px; z-index: 2; } #connection-status { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; padding: 30% 20% 20% 20%; font-size: 18px; color: #222; background: #fff; text-align: center; box-sizing: border-box; line-height: 1. https://reproducibility.rocks/notes_for_instructors/ Mon, 01 Jan 0001 00:00:00 +0000 https://reproducibility.rocks/notes_for_instructors/ Notes for instructors Would you like to teach this workshop/use the materials for your own course? We’ve compiled here a list of tools we usually use while we teach. The check points are instances when we ask the students how familiar are with x topic. Depending on their answers we decide if we can skip the topic, explain a few things or going through it in depth. Attribution https://reproducibility.rocks/attribution/ Mon, 01 Jan 0001 00:00:00 +0000 https://reproducibility.rocks/attribution/ Sheep drawing by Gordon Johnson from Pixabay Pixel Cells by Manfred Steger from Pixabay Icon: Sheep by Adriansyah from NounProject.com Day 1 sheep: Image by OpenClipart-Vectors from Pixabay License https://reproducibility.rocks/license/ Mon, 01 Jan 0001 00:00:00 +0000 https://reproducibility.rocks/license/ All materials are licensed with Creative Commons Attribution-ShareAlike 4.0 International License. Help yourself!