Emory IBS 519 Guest Lectures: Fall 2024
by Melinda Higgins, PhD; https://melindahiggins.netlify.app/
Week 2 Lecture: Intro to R, RStudio and Rmarkdown
This class will cover:
- Explore RStudio environment
- command line
- R scripts
- packages
- getting help
- RStudio Education
- R markdown intro (brief)
- Importing & viewing data
- Data types - classes of variables
- strings
- integers
- numeric
- logical
- factors (brief intro)
Materials
Week 3 Lecture: Data Exploration and Wrangling (with dplyr)
This class will cover:
- Data exploration
- numerical exploration
- graphical exploration
- histograms
- scatterplots
- learn more at:
- more with the
abalone
dataset
- Tidyverse -
dyplr
package
- glimpse
- select
- filter (explore and clean)
- arrange
- mutate (making new variables)
- rename
- summarise
- group_by
Materials
- RStudio Cloud Project - in class exercises
- RStudio Cloud Project - Homework 3
- see “Assignment3_HW3_DataWrangling_Cleaning” on RStudio.cloud
- also see Github repository
Week 4 Lecture: Reproducible Research and RMarkdown
Today’s class will cover:
- Make your life easier with Rmarkdown
- Writing a step-by-step analysis report
- make DOCX and HTML reports (PDF optional)
- Using parameters - automate your work - learn more at:
- Making other “Rmarkdown” formats
- see Rmarkdown Galley
- Documents (HTML, DOC and PDF - see notes below)
- Slides (HTML slidy and ioslides; PDF Beamer; and Microsoft Powerpoint PPT)
- and other templates - see RMarkdown Gallery to learn more
- more on making PDF documents:
- PDF requires some version of LaTeX - easiest is installing the
tinytex
package
- see https://yihui.org/tinytex/
- after installing the
tinytex
package, you still have to run tinytex::install_tinytex()
to actually install the tinytex program with all of the LaTeX packages.
- Learn more about LaTeX at:
Materials for wk4
RStudio Cloud Project “IBS_519_wk4_lecture08_mhiggins” - files explained:
This project is also posted in Github at https://github.com/melindahiggins2000/IBS_519_wk4_lecture08_mhiggins
Main Examples Today:
Files:
- 01_Basic_RmarkdownReport.Rmd
- 02_Default_RmarkdownTemplate.Rmd
- make reports (HTML, DOCX and PDF)
- make slides (slidy, ioslides, beamer and PPT)
- 03_AbaloneReport_simple.Rmd
- 04_AbaloneReport_paramTemplate.Rmd
- 05_AbaloneReport_paramInYAML.Rmd
- 06_AbaloneReport_param_UserInput.Rmd
Packages used in main examples today:
tidyverse
(includes readr
, dplyr
, ggplot2
)
knitr
printr
rmarkdown
purrr
gtsummary
IF TIME - optional demos:
Files:
- rmdformats_readthedown.Rmd
- flexdashboard.Rmd
- EDA_tools.Rmd
Packages needed:
- For EDA_tools.Rmd
- For rmdformats_readthedown.Rmd
- For flexdashboard.Rmd
Follow-up from wk3
- review the
order_sort_arrange.R
scipt
More resources:
R/RStudio Helpful Resources