Last active
July 19, 2016 16:38
-
-
Save cimentadaj/d28d1590fa0a8ff0db9a22f8bc235c89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First let's download some data files which we will use in the tutorial. | |
library(ggplot2) # install.packages("ggplot2") if you don't have the package | |
library(downloader) # install.packages("downloader") if you don't have the package | |
# Create and set a new directory for the tutorial | |
dir.create(paste0(getwd(),"/ggplot2tutorial")) | |
setwd(paste0(getwd(),"/ggplot2tutorial")) | |
# Download the zip file with all the data and unzip it to the tutorial folder | |
download("http://tutorials.iq.harvard.edu/R/Rgraphics.zip", destfile="Rgraphics.zip", mode="wb") | |
unzip("Rgraphics.zip") | |
# Let's read the data we'll use. | |
housing <- read.csv("./Rgraphics/dataSets/landdata-states.csv") | |
head(housing[1:5]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment