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
rm(list = ls()) | |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("zoo", "tm", "ggplot2", "lme4", "arm", "Snowball") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# From: http://www.cnn.com/2012/10/03/politics/debate-transcript/index.html | |
Transcript <- readLines("https://raw.github.com/dsparks/Test_image/master/Denver_Debate_Transcript.txt") | |
head(Transcript, 20) |
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
#plot.stream makes a "stream plot" where each y series is plotted | |
#as stacked filled polygons on alternating sides of a baseline. | |
# | |
#Arguments include: | |
#'x' - a vector of values | |
#'y' - a matrix of data series (columns) corresponding to x | |
#'order.method' = c("as.is", "max", "first") | |
# "as.is" - plot in order of y column | |
# "max" - plot in order of when each y series reaches maximum value | |
# "first" - plot in order of when each y series first value > 0 |
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
@charset "UTF-8"; | |
body { | |
-webkit-color-correction: srgb; | |
background-color: white; | |
background-image: none; | |
margin: 0px 0px 0px 0px; | |
} | |
chatitem { | |
width: 100%; |