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
## this should get loaded by your ~/.Rprofile | |
## either just stick all these definitions right in ~/.Rprofile, or | |
## have ~/.Rprofile source this file, etc. | |
source.dirs <- c( | |
## add any "base" locations here. this is like a "classpath" in java | |
## my default is c("~/myRUtils/src","~/companyRUtils/src","~/publicRUtils"), | |
## but you can use whatever you like | |
paste(Sys.getenv("HOME"),"myRUtils","src", sep="/"), | |
paste(Sys.getenv("HOME"),"companyRUtils","src", sep="/"), |
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
doInstall <- TRUE | |
toInstall <- c("maps", "ggplot2") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
library(ggplot2) | |
library(maps) | |
Prison <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/prison.csv") | |
head(Prison) |