Wednesday 24 March 2021
Proportion of success
\[ \frac{\varphi}{\varphi + \theta} \]
All trials
\[ \varphi + \theta \]
We often think of science as a function of success
\[ \varphi \sim \text{Binomial}\left( \varphi + \theta,\, \frac{\varphi}{\varphi + \theta}\right) \]
\(\color{darkgreen}{\text{mathematics}}\) \(\to\)
code \(\to\)
paper \(\to\)
toolthe nature of interdisciplinary research
\(\color{darkred}{\times}\) mathematics \(\not\to\)
\(\color{darkred}{\times}\) code \(\not\to\)
\(\color{darkred}{\times}\) paper \(\not\to\)
\(\color{darkred}{\times}\) tool
## # A tibble: 6 x 1 ## sections_in_this_talk ## <chr> ## 1 **.Rmd**-driven development ## 2 **functions** ## 3 **documentation** of functions ## 4 **git** and version control ## 5 **testing** and **workflow** of functions and data ## 6 reproducible **document** for publication
sections |
---|
.Rmd-driven development |
functions |
documentation of functions |
git and version control |
testing and workflow of functions and data |
reproducible document for publication |
An open source license for academics has additional needs:
How I Fail S02E10: Charles T. Gray (PhD'21, Interdisciplinary Computational Metascience) interview with @cantabile #AcademicTwitter #CVofFailures https://t.co/d7hbHMxSqX
— Dr Veronika Cheplygina (@DrVeronikaCH) March 2, 2021
<>
Grolemund YX JJ Allaire, Garrett. R Markdown: The Definitive Guide.; 2020. Accessed February 7, 2021. https://bookdown.org/yihui/rmarkdown/
Riederer E. RMarkdown Driven Development (RmdDD). Emily Riederer. Published May 4, 2019. Accessed January 30, 2020. https://emilyriederer.netlify.com/post/rmarkdown-driven-development/
Knitr with LaTeX. Accessed March 3, 2021. http://kbroman.org/knitr_knutshell/pages/latex.html
Set up with Happy Git to R
Create repository on GitHub
# pr helpers pr_init(branch = "idea") # make changes # commit pr_push() # wait for merge pr_finish()
Bryan J. Excuse Me, Do You Have a Moment to Talk About Version Control? The American Statistician. 2018;72(1):20-27. doi:10.1080/00031305.2017.1399928
various. Git - Reference.; 2021. Accessed February 7, 2021. https://git-scm.com/docs
various. GitHub CLI Manual.; 2021. Accessed February 7, 2021. https://cli.github.com/manual/index
Bryan J. Happy Git with R.; 2019. https://happygitwithr.com/resources.html
Pull request helpers • usethis. Accessed March 3, 2021. https://usethis.r-lib.org/articles/articles/pr-functions.html
vignette("rd")
Wickham H. Advanced R. 1 edition. Routledge; 2014.
Wickham H. R Packages: Organize, Test, Document, and Share Your Code. O’Reilly Media; 2015. https://books.google.com.au/books?id=DqSxBwAAQBAJ
Landau W, Company CEL and. Chapter 2 Walkthrough | The Targets R Package User Manual. Accessed March 3, 2021. https://books.ropensci.org/targets
Wickham H. R Packages: Organize, Test, Document, and Share Your Code. O’Reilly Media; 2015. https://books.google.com.au/books?id=DqSxBwAAQBAJ
todo: get visnet & paper
Installed one package and managed to run @DrVeronikaCH's shiny app locally— how often does that happen?!
— Dr Charles T. Gray ⚔🦋 (@cantabile) February 24, 2021
Her first repo on GH, first R project, and it's from 5 years ago!
Installed one 📦then runApp() – and it just works 😮
Heroic reproducibility! 🥐🥐🥐 pic.twitter.com/JIOzfOejch
It's just awesome what one can do in R. Using just a few packages, I just created a site with the results of eight network meta-analysyes.
— Dr Charles T. Gray ⚔🦋 (@cantabile) March 23, 2021
🧵on the awesome packages that helped me do this pic.twitter.com/9qsb1vjnnq
If you failed, it means you tried.
You’ll never get everything right in computational science.
Trying is the best you can do. You will fail. You find useful workflows.