#### Overview ---- # Please register at: # https://rstudio.cloud/spaces/8255/join?access_code=qUa%2BXD%2B4xxJr%2BkTExODUZthrQvToGCX3nWn8NG0F # View RStudio Cloud Overview: # https://github.com/stat385uiuc/rstudio-cloud-intro/raw/master/01-rstudio-cloud-stat385.pdf #### Required extensions ---- # Install packages or extensions to R language found on CRAN # Uncomment to run the command by deleting the `#` before it. # install.packages("ggplot2") # Enable the package by loading library("ggplot2") #### Example Graphs ---- # Hi STAT 385 @ UIUC Spring 2019 # Create a scatter plot ggplot(mpg, aes(class, hwy)) + geom_point() # Plot a jittered scatter plot ggplot(mpg, aes(class, hwy)) + geom_jitter() # Create a box plot ggplot(mpg, aes(class, hwy)) + geom_boxplot() # Combine both! ggplot(mpg, aes(class, hwy)) + geom_jitter() + geom_boxplot() # Another popular way of a similar visualization ggplot(mpg, aes(class, hwy)) + geom_violin() # Split data based the type of class it is. ggplot(mpg, aes(displ, hwy)) + geom_point() + facet_wrap(~class)