$30 off During Our Annual Pro Sale. View Details »

In the beginning was R Markdown

In the beginning was R Markdown

In this talk I will give a brief review of teaching statistics and data analysis through the lens of reproducibility with R Markdown, and how to use this tool effectively in teaching to maintain reproducibility as the scope of your students' projects and their experience grow.

Mine Cetinkaya-Rundel

February 25, 2021
Tweet

More Decks by Mine Cetinkaya-Rundel

Other Decks in Education

Transcript

  1. 🔗 bit.ly/begin-rmd

    View Slide

  2. setting the stage

    View Slide

  3. replicability reproducibility
    same research question same research question
    same results same results
    new data same data

    View Slide

  4. View Slide

  5. a little bit of history…

    View Slide

  6. useR! 2012

    View Slide

  7. #1:


    Convince
    researchers to adopt
    a reproducible
    research workflow
    #2:


    Train new
    researchers who
    don’t have any
    other workflow

    View Slide

  8. reproducibility


    View Slide

  9. View Slide

  10. View Slide

  11. View Slide

  12. View Slide

  13. View Slide

  14. data


    analysis
    - descriptive stats


    - plots & tables


    - model output
    write-up
    - research question


    & context


    - interpretations


    - conclusions
    lab


    report
    copy-paste copy-paste
    text block
    data analysis
    text block
    data analysis
    text block
    + code & output tightly connected


    + easy to reproduce, update, collaborate


    + standardised format


    - unfamiliar format, must learn syntax
    Word, Google Docs, etc. R Markdown

    View Slide

  15. View Slide

  16. fast forward to the present

    View Slide

  17. View Slide

  18. View Slide

  19. growing out of r markdown
    with

    View Slide

  20. r markdown


    rstudio


    projects

    View Slide

  21. r markdown


    external


    data

    View Slide

  22. r markdown


    external


    data


    in other


    folders with


    here
    : :
    here()

    View Slide

  23. r markdown


    version


    control

    View Slide

  24. version control


    with Git and GitHub
    for students for educators
    + learn a best practice
    for reproducibility


    + get familiar with
    systems that are widely
    used in industry and
    academia


    + facilitate collaboration
    and sharing
    + teach a best practice
    for reproducibility


    + centralise the
    distribution and
    collection of
    assignments


    + enable students to
    work collaboratively
    (even when working
    remotely!)

    View Slide

  25. a simple assignment…

    View Slide

  26. …that is straightforward to assess

    View Slide

  27. a more complex project…

    View Slide

  28. …with automated checks


    leveraging GitHub actions

    View Slide

  29. allowed
    -
    f
    i
    les.yaml
    project
    -
    allowed
    -
    f
    i
    les.R

    View Slide

  30. knit
    -
    readme.yaml

    View Slide

  31. r markdown


    other


    formats

    View Slide

  32. View Slide

  33. View Slide

  34. r markdown


    you,


    the


    educator

    View Slide

  35. putting it altogether

    View Slide

  36. View Slide

  37. references & acknowledgements
    - Baumer, B., Çetinkaya-Rundel, M., Bray, A., Loi, L., & Horton, N. J. (2014). "R Markdown: Integrating A Reproducible
    Analysis Tool into Introductory Statistics." Technology Innovations in Statistics Education, 8(1). https://
    escholarship.org/uc/item/90b2f5xh.


    - Beckman, M. D., Çetinkaya-Rundel, M., Horton, N. J., Rundel, C. W., Sullivan, A. J., & Tackett, M. (2020).
    Implementing version control with Git and GitHub as a learning objective in statistics and data science courses.
    Journal of Statistics Education, 1-35.


    - Carver, R., et al. (2016) "Guidelines for assessment and instruction in statistics education (GAISE) college report
    2016." http://www.amstat.org/education/gaise/GaiseCollege_full.pdf.


    - Çetinkaya-Rundel, M. (2012) "Planting seeds of reproducibility with knitr and markdown" Citizen Statistician. http://
    www.citizen-statistician.org/2012/10/planting-seeds-of-reproducibility-with-knitr-and-markdown.


    - Horst A.M., Hill A.P., Gorman K.B. (2020). palmerpenguins: Palmer Archipelago (Antarctica) penguin data. R
    package version 0.1.0. https://allisonhorst.github.io/palmerpenguins. doi: 10.5281/zenodo.3960218.


    - Sharla Gelfand (2021). ggkeyboard: Plot a Keyboard Using "ggplot2". R package version 0.0.0.9012, https://
    github.com/sharlagelfand/ggkeyboard.


    - Background image credit: Tighe Flanagan, https://www.instagram.com/p/CFcKz89nWE0.

    View Slide

  38. and R Markdown continues to facilitate reproducibility,


    no matter your scope and experience…
    🔗 bit.ly/begin-rmd

    View Slide