2019 R-Medicine Conference Day 1

Shipping up to Boston!
R
Author

Mara Alexeev

Published

September 12, 2019

Modified

July 29, 2023

R Markdown for Medicine

Attended a workshop by Alison Hill. Here are some of my notes to future self to play with later.

  1. Figure Labeling automatically
  2. distill package
  3. html_document2 yaml output
  4. xaringan
  5. posterdown
  6. stargazer
  7. table making
  8. different themes (berlin, roma)
  9. project management
  10. flexdashboard
  11. redoc
  12. spelling
  13. wordcountaddin
  14. htmlwidgets for R
  15. leaflet
  16. gitlab
  17. DataTables
  18. revealjs

Figure out how to…

  1. Bookdown: how to combine multiple .Rmd into a “book”
  2. Make a powerpoint presenation from Rmarkdown (my work is heavy in ppt)

Best practices

  1. Project
  2. Use here package
  3. Have a folder for figures to print to and save

Healthcare Specific R Packages

  1. qicharts
  2. qcc
  3. comorbidity

Make a table in Rmarkdown

Column 1 left justify Column 2 centered Columne 3 right justified
A B C

Holy cow, that worked on the first try!

Pets not Livestock

Alison Horst advised us that if our figures are more like pets than livestock, we should name them!!!

Here’s my attempt to name some figures and link them throughout the document.

Code
library(tidyverse)
Warning: package 'tidyverse' was built under R version 4.2.2
Warning: package 'ggplot2' was built under R version 4.2.2
Warning: package 'tidyr' was built under R version 4.2.2
Warning: package 'readr' was built under R version 4.2.2
Warning: package 'purrr' was built under R version 4.2.2
Warning: package 'dplyr' was built under R version 4.2.2
Warning: package 'stringr' was built under R version 4.2.2
Warning: package 'forcats' was built under R version 4.2.2
Warning: package 'lubridate' was built under R version 4.2.2
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.0     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.0
✔ ggplot2   3.4.1     ✔ tibble    3.1.8
✔ lubridate 1.9.2     ✔ tidyr     1.3.0
✔ purrr     1.0.1     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Code
bar_graph_mtcars <- ggplot(mtcars, aes(x = drv)) + geom_bar()

Resources

  1. https://commonmark.org/help/
  2. https://rmd4medicine.netlify.com