DeSante cdesante

View Rwords.r
1 2 3 4 5 6 7 8 9 10
My.Words <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/Randwords.csv")
My.Words$RANDOM.WORDS <- as.character(My.Words$RANDOM.WORDS)
 
#Step 1: Split Character Vectors into Sub-strings:
strsplit(My.Words$RANDOM.WORDS, "")
 
Split.List <- strsplit(My.Words$RANDOM.WORDS, "")
 
#Step 2: Assign a numeric value to each of the 26 letters:
LETTERS
View basicmap.r
1 2 3 4 5 6 7 8 9
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)
View apsrtable.r
1 2 3 4 5 6 7 8 9
doInstall <- TRUE
toInstall <- c("apsrtable")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
 
#http://cran.r-project.org/web/packages/apsrtable/apsrtable.pdf
 
 
library(apsrtable)
View apsrtable.r
1 2 3 4 5 6 7 8 9
doInstall <- TRUE
toInstall <- c("apsrtable")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
 
#http://cran.r-project.org/web/packages/apsrtable/apsrtable.pdf
 
 
library(apsrtable)
View foreign.r
1 2 3 4 5 6 7 8 9
doInstall <- TRUE
toInstall <- c("foreign")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
 
 
#http://cran.r-project.org/web/packages/foreign/foreign.pdf
#setwd("your working directory here")
library(foreign)
View happythanksgiving.r
1 2 3 4 5 6 7 8 9
toInstall <- c("ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
library(ggplot2)
 
Turkey <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/turkey.csv")
 
ggplot(data = Turkey) + geom_tile(aes(x = Happy, y = Thanksgiving, fill=Turkey.Colors,
width=1))+ scale_fill_identity() + theme_bw()
View hjustvjust.r
1 2 3 4 5 6 7 8 9 10
 
hjustvjust <- expand.grid(
hjust=c(0, 0.5, 1),
vjust=c(0, 0.5, 1),
angle=c(0, 45, 90),
text="is-R"
)
 
hv <- ggplot(hjustvjust, aes(x=hjust, y=vjust)) +
geom_point() +
View plottext2.r
1 2 3 4 5 6 7 8 9 10
toInstall <- c("ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
library(ggplot2)
 
text.plots <- data.frame(
SUPP = c (rep(c( "Control", "Vitamin C", "Orange Juice" ), each = 1500)) ,
DOSE = rep(rep(c( "I", "II", "III" ), each=500), 3),
LENGTH = c(rnorm(500, 4, 2),
rnorm(500, 7, 1.2),
View plottext1.r
1 2 3 4 5 6 7 8 9 10
toInstall <- c("ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
library(ggplot2)
 
text.plots <- data.frame(
SUPP = c (rep(c( "Control", "Vitamin C", "Orange Juice" ), each = 1500)) ,
DOSE = rep(rep(c( "I", "II", "III" ), each=500), 3),
LENGTH = c(rnorm(500, 4, 2),
rnorm(500, 7, 1.2),
View plottext3.r
1 2 3 4 5 6 7 8 9 10
toInstall <- c("ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
library(ggplot2)
 
text.plots <- data.frame(
SUPP = c (rep(c( "Control", "Vitamin C", "Orange Juice" ), each = 1500)) ,
DOSE = rep(rep(c( "I", "II", "III" ), each=500), 3),
LENGTH = c(rnorm(500, 4, 2),
rnorm(500, 7, 1.2),
Something went wrong with that request. Please try again.