Introduction to Visualization with R
Overview
Teaching: 5 min min
Exercises: 0 minQuestions
How to visualize data in R
Objectives
Basic Introductory of plotting system in R
Course content:
- Making exploratory graphs
- Principles of analytic graphics
- Plotting systems and graphics devices in R
- The base, lattice, and ggplot2 plotting systems in R
Exploratory graph
Why do we use graphs in data analysis?
- To understand data properties
- To find patterns in data
- To suggest modeling strategies
- To “debug” analyses
- To communicate results
Ploting System
There are 3 main plotting systems in R:
The Base plotting system
- Start with blank plot and build up the plot
- Plot is just a series of R command
- Flexible
The Lattice plotting system (using package::lattice)
- Plots created using single function call
- Good for putting many plots to screen
- Cannot add to plots once created
The ggplot plotting system (using package::ggplot2)
- Similar to Lattice but easier
- Many default mode
- Flexible between Base and Lattice
Key Points
R Base plotting system and ggplot