Skip to content

Instantly share code, notes, and snippets.

View nareal's full-sized avatar

Nelson Areal nareal

View GitHub Profile
@nareal
nareal / server.R
Created December 19, 2012 19:04 — forked from schaunwheeler/LICENSE
library(shiny)
library(plyr)
library(scales)
library(ggplot2)
library(reshape2)
set.seed(12435)
state <- sample(c("CA", "WA", "OR", "AZ", "NV", "UT"), 40000, replace = T)
lowgrade <- sample(c(0,1), 40000, replace = T)
@nareal
nareal / global.R
Created December 19, 2012 18:51 — forked from psychemedia/global.R
library(RJSONIO)
library(plyr)
#racechart
#Helper functions
getNum=function(x){as.numeric(as.character(x))}
timeInS=function(tStr){
x=unlist(strsplit(tStr,':'))
tS=60*getNum(x[1])+getNum(x[2])