This repository has been archived by the owner. It is now read-only.
Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
IAPvisualization.pptx
IAPvisualization_script.R
README.md
pollData.csv

README.md

Visualization in R

Prerequisites

This module builds on the Intro R and Intermediate R classes given in the first week. You should be comfortable writing R code to run linear regression, logistic regression, and clustering algorithms which were all taught in Intro R. You should also be comfortable using the table command, the apply family of functions (tapply, lapply, apply), the merge command, the split-apply-combine framework, and creating your own functions. These were taught in Intermediate R. Please review all these concepts before class on Tuesday, especially if you are new to R.

Installation Instructions

Please run the following commands in an R console:

install.packages("ggplot2")
install.packages("maps")
install.packages("ggmap")
install.packages("mapproj")

Assignment

Run the following code and save the 3 plots that are produced. Submit a document with the three plots on Stellar.

library(ggplot2)
ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()

Save plot.

library(maps)
france = map_data("france")
ggplot(france, aes(x = long, y = lat, group = group)) + geom_polygon()

Save plot.

library(ggmap)
MIT = get_map(location = "Massachusetts Institute of Technology", zoom = 15)
ggmap(MIT)

Save plot.