Skip to content

Instantly share code, notes, and snippets.

@bhive01
bhive01 / 0_circle.jpg
Last active January 12, 2016 21:22
Matisse Colors
0_circle.jpg
## short version
require(ggplot2)
graphdata <- structure(list(X12136 = c(79L, 15L, 60L, 33L, 53L, 89L, 21L,
25L, 83L, 3L, 64L, 47L, 39L, 1L, 99L, 69L, 9L, 59L, 8L, 10L,
23L, 74L, 65L, 81L, 42L, 79L, 15L, 60L, 33L, 53L, 89L, 21L, 25L,
83L, 3L, 64L, 47L, 39L, 1L, 99L, 69L, 9L, 59L, 8L, 10L, 23L,
74L, 65L, 81L, 42L, 79L, 15L, 60L, 33L, 53L, 89L, 21L, 25L, 83L,
3L), pheno = structure(list(Condition = structure(c(2L, 1L, 2L,
1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L,
require(tidyr)
require(dplyr)
#require(ggplot2)
# from: https://twitter.com/JennyBryan/status/646047312830050304
separate(data.frame(x = "howdy"), x, into = 1:6, sep = "(?!^)")
#works with more than one word
separate(data.frame(x = c("howdy", "snake")), x, into = 1:6, sep = "(?!^)")
@bhive01
bhive01 / code.R
Created January 13, 2014 15:03 — forked from patilv/code.R
library(rCharts)
library(plyr)
library(reshape2)
library(scales)
findata=read.csv("https://raw.github.com/patilv/rChartsTutorials/master/findata.csv")
# These are data regarding NCAA athletic department expenses at public universities. Please see the blog post where these charts were originally used
# regarding more details on the origins of these data.: http://analyticsandvisualization.blogspot.com/2013/10/subsidies-revenues-and-expenses-of-ncaa.html
findata=findata[,-c(1:2)] # removing first dummy column - the csv quirk - and second column on Rank.