I am involved in environmental science. The data analysis for my following scientific paper is done 100% in R. I'm wondering if I should clean up my script before submitting the article for review and document it properly in English (which is not my native language), then upload it to GitHub and add information about it in the manuscript. Do you perhaps have any experience that adding the source code of your analyses has had a positive impact on the review process?
-
2I don't know about environmental science, but in general the amount of benefit it gives ranges from zero (it makes no difference) to the maximum possible (publishing code is a requirement). Presumably there are many cases between those two extremes. It depends on the field and the journal and you should be able to get some idea by reading the journal's requirements.– toby544Commented Jun 30 at 12:57
2 Answers
I’m in the environmental sciences. Unless you are submitting to a journal that has a particular focus on code and analysis (e.g., an environmental modelling journal) it probably won’t make a difference. It might increase your chances if your written description of your method is difficult to follow but the code is straightforward, or if your results are so surprising that the reviewers will want to check for themselves.
If the code is useful to others for their own analyses and makes it easier for others to apply the same method, then it might increase your citation count after publication — but if that’s the case (since it is in R) you’ll get a bigger boost if you also publish it as a package through CRAN.
In general, you want your research to adhere to FAIR principles - which means (among others) that it needs to be reproducible by others. The best way of achieving that is also giving others access to any custom code you used.
Personally I also see another advantage: If you publish your code with the paper, then this saves you (or the corresponding author) work in the future. No digging through archives in "who did we do this again" mode, but clarity form the start: Here's the script, that's how we did it, no go try it yourself. I think it's great.