Workshop outline

  1. Introduction (~10 min)
    • Phase: final-paper.Rmd
    • Show “final paper” Rmd (has all the things: table one, multi-panel plot, etc)
    • Your turn
      • Get in groups, introduce, KNIT (to HTML)! Read through Rmd + output, what does it do? Annotate, narrate.
  2. Session: R Markdown Basics (40 min)
    • Phase: first-eda.Rmd (an exploratory data analysis)
    • Basic anatomy of this Rmd doc (4 key components) (~5 min)
    • YAML (~5 min)
    • Markdown (~5 min)
      • Headers
      • Lists
      • Links and images
      • Equations
      • Tables
    • Code (~5 min)
      • Code chunks
      • Inline code
    • Output (~5 min)
      • Chunk options
    • How it all fits together (~5 min)
    • Your turn (~10 min)
      • Change output format in YAML to distill::distill_article (note! default global knitr echo = FALSE for this output format!)
      • Change some code chunks to include=FALSE
      • I have echo = TRUE set as a global option; turn this to FALSE then set the most critical code chunks to echo = TRUE
      • (Perhaps?) add more meaningful headers and chunk names (then look at in up/down nav and how to show document outline in RStudio)
  3. Session: Tables (45 min)
    • Phase: first-progress.Rmd (a first progress report)
    • Change the output format to word! (~5 min)
    • Make table one with arsenal::tableby() (~20 min):
      • remember to point out knitr code chunk options to results="asis"
      • grouped by arm with details on sex and age in each group
      • ungrouped, with stats on BMI, sex, Age in each group
      • control digits
      • export table
    • Consider flextable here?
    • Your turn (~10 min)
  4. Session: Data and workflows (50 min)
    • Phase: first-draft.Rmd (a first draft manuscript)
  5. Session: Graphics (45 min)
    • Phase: final-paper.Rmd (a mock paper, based on mock data)