Project Management in R 47 th Annual Biology
Project Management (in R) 47 th Annual Biology Symposium Bernard Marius 't Hart Mark C. Adkins
Overview • • About Us Data Collection Data Repositories Code Repositories • Accessing Code Repositories • Organizing Repositories • • • Future Proofing Accessing Data Repositories Oops! Codebooks Rmarkdown Additional Resources Add a footer 2
About Us Bernard Marius 't Hart http: //mariusthart. net/ • Research Associate in 3 Psychology/Kinesiology labs • Topics: visual perception, attention and illusions as well as cognitive and sensory aspects of motor control and motor learning • CVR Data Café host • Neuromatch Academy content creator Add a footer 3
About Us Mark C. Adkins www. standard-deviator. com • Ph. D candidate specializing in quantitative methods • R enthusiast • Workshops • Learning R • Monte Carlo Simulations • Data Cleaning Add a footer 4
Data Collection
Data Collection • Use formats which are interoperable and not specific to particular software packages • E. g. , CSV • Google forms • Formr • https: //formr. org/ Add a footer 6
Data Repositories Its gotta live somewhere!
Data Repositories • The Open Science Framework (OSF) offers free repositories for data and other project resources (public or private) • https: //help. osf. io/hc/en-us • York also has Dataverse repositories • https: //dataverse. scholarsportal. info/datav erse/york Add a footer 8
Code Repositories Its gotta live somewhere too!
Code Repositories • Github offer great (and free) repositories for code • https: //github. com/ • It also integrate well with RStudio Add a footer 10
Accessing Code Repositories Bringing it all home
Accessing Code Repositories • Code can be accessed via a web browser, terminals, or integrated development environments (e. g. , Rstudio) • https: //happygitwithr. com/ Add a footer 12
Organizing Repositories Just say no to the chaos!
Organizing Repositories • R projects are a great way to organize your projects and make it easy to keep projects functionally separate • https: //support. rstudio. com/hc/enus/articles/200526207 -Using-Projects Add a footer 14
Future Proofing Protect your code from unforeseeable problems
Future Proofing • {renv} works at the project level ensure that your code works as well as possible into the future • https: //rstudio. github. io/renv/articles/renv. html • It automates the installation of specific versions of packages to make collaborating much easier (and your code more reproducible) Add a footer 16
Accessing Data Repositories Getting it from there to here
Accessing Data Repositories • {osfr} is an r package designed for interacting with OSF repositories • https: //cran. rproject. org/web/packages/osfr/vignettes/g etting_started. html • https: //github. com/ropensci/osfr Add a footer 18
Oops! Ctrl + z
Oops! • Git is a version control system • There is no undo button in life, but at least you can revert to previous states in a projects history • https: //git-scm. com/book/en/v 2/Getting. Started-What-is-Git%3 F • https: //happygitwithr. com/ Add a footer 20
Data Codebooks Sure, I can download your data, but what does it even mean?
Data Codebooks • Codebooks (or data dictionaries) are just as vital as the data itself • Without good documentation, data can become unusable and a waste of spent resources • One (complicated) option is the {codebook} package • https: //rubenarslan. github. io/codebook/ar ticles/codebook_tutorial. html Add a footer 22
Documentation Literate programming is not just for the cool kids anymore!
Documentation • Report writing and general documenting is much easier with literate programming • Code, results, and documentation can be woven together into a single document using Rmarkdown • https: //bookdown. org/yihui/rmarkdown/ • https: //rmarkdown. rstudio. com/lesson 1. html Add a footer 24
Additional Resources • R books • Getting started with R and the tidyverse • https: //r 4 ds. had. co. nz/ • Advances R • https: //adv-r. hadley. nz/ • Building R packages • https: //r-pkgs. org/ • Graphics • https: //r-graphics. org/ • https: //www. data-to-viz. com/ • https: //clauswilke. com/dataviz/ • Tutorials • https: //rstudio. cloud/learn/primers Add a footer 25
- Slides: 25