Hello fellow Hacker,
In this tutorial we provide an example of what the data collection for the 2022 Reprothon will look like. If you want to learn how you can contribute, please see the “Getting started” guide.
1. Click on the link below to obtain a question
Here is a link to the Question Generator which will take you to our ShinyApp. Press the button “Get A New Sample” and this will generate a link to a StackOverflow question, please click this link!
2. Familiarize yourself with the question
Read through the question, comments, code and answers to make sure you understand what the question is asking. If there is anything unsual here you can look at our troubleshooting guide(link) and/or include it in the “comments” section of the data entry form. If in doubt ask one of the admin team!
3. Look for the accepted answer
The accepted answer shows a green tickmark on the left and is usually the first answer after the question.
4. Open a new R or Rstudio session
Please always restart R before reproducing a question.
5. Reproduce accepted answer
In this example, you can just copy and paste the accepted solution from StackOverflow into R. Press “crtl + A” to highlight all your code and press “enter” to run it.
In this example, the code provided in the answer was missing the function to load the package used. Add the code required to load the appropriate package with functions require()
or library()
.
In other cases you might have to install new packages before you can reproduce the example. Sometimes the code generating the example will only be provided in the question and not the answer provided, you should then copy the code that generates the data from the question. Check if your own solution reproduces the output of the solution on Stack Overflow.
6. The Reprothon2022 Data Entry Google Form
Click this link to access the Data Entry form.
You will be asked to enter the following:
Lastly,:
Congrats !!
You did it!!
Thank you so much for contributing!!
{insert cute you rock kitten meme here}
Take on another question from the Question Generator and don’t forget to reload your R before starting to reproduce.
Reproducing code is not always easy, in fact it rarely is! Check out the FAQ about solutions to common problems when reproducing code on StackOverflow.