Lecture 12: Visualize data using R/ggplot2
In addition to the Python programming language, we’ll use R (as implemented in the RStudio interface) as a second programming language for data analysis tasks. In general, R is an excellent tool for data manipulation (cleaning, filtering, transforming), analysis (modeling and statistics), and visualization.
Learning objectives
- Use the RStudio interface to create R scripts documented with code comments
- Import tabular data into R and create basic data visualizations (scatterplots, line plots) using the R package
ggplot2
Class materials
- To view slides in presentation mode, open
lecture.html
.
- Data used in these exercises can be found in
example_dataset_1.tsv
.
- If you would like additional reference material for tasks useful to R, important features of RStudio, and plain-language descriptions of how R works, Data Carpentry’s materials provide additional examples of data manipulation and visualization.
Reminders
- Homework 6 is posted today and is due November 19.