Thread 1/n
And no one else can ever build upon those data and code, hindering scientific progress 3/n
The solution is NOT hiding our code but showing it early and often, be willing to fix it & value people who correct themselves (even published papers) nature.com/news/2010/1010… 4/n
Most results are based on code written & seen by a SINGLE PERSON EVER.
Even if you ask coauthors to have a look at your code, very rarely anyone peeks. No checks, no feedback. 5/n
Many more scientists could be taught how to write good and robust code: defensive programming, literate programming, version control, etc 7/n
-Invest on learning stats & programming
-Version control everything: data, code, results
-Use assertr github.com/ropensci/asser… to check data
-Use testthat testthat.r-lib.org to test functions
1/2
-Write reproducible manuscripts in Rmarkdown rmarkdown.rstudio.com
-Publish data & code when submitting ms as the latest
More good advice here doi.org/10.1371/journa…