Skip to content

Instantly share code, notes, and snippets.

@jrauser
jrauser / onename.txt
Created October 27, 2015 04:34
onename verify
Verifying that +jrauser is my blockchain ID. https://onename.com/jrauser
@jrauser
jrauser / knitr_cache_issue
Created July 10, 2014 22:13
This small RMarkdown files demonstrates the knitr chunk label prefix cache problem
knitr cache problem
========================================================
This markdown doc demonstrates the problem. I am using R 3.0.2 (in RStudio, if it matters) and knitr 1.5.
```{r libs}
library(knitr)
opts_chunk$set(cache=TRUE, autodep=TRUE)
library(ggplot2)
```
@jrauser
jrauser / layd_plots.r
Created June 23, 2011 16:55
Look at your data plots
points_per_hour<-2000
layd_raw_transition<-
data.frame(timestamp=factor(c(rep(seq(0,11),points_per_hour),
rep(seq(12,23),points_per_hour))),
latency=c(rgamma(12*points_per_hour,shape=3,scale=60),
rgamma(12*points_per_hour*0.9,shape=2,scale=60),
rgamma(12*points_per_hour*0.1,shape=8,scale=60)),
type=(c(rep("before",12*points_per_hour),
rep("after",12*points_per_hour))))
@jrauser
jrauser / ggplot-timeseries-bug.r
Created April 18, 2011 18:17
This will output the message: Error in anyDuplicated.default(breaks) : length 1293868801 is too large for hashing
library(ggplot2)
df<-data.frame(timestamp=as.POSIXct(seq(1,10000*60,60),origin='2011-04-01'),value=runif(10000))
ggplot(df,aes(timestamp,value))+geom_line()
# Error in anyDuplicated.default(breaks) :
# length 1293868801 is too large for hashing
library(ggplot2)
df<-data.frame(timestamp=as.POSIXct(seq(1,10000*60,60),origin='2011-04-01',tz="UTC"),value=runif(10000))
ggplot(df,aes(timestamp,value))+geom_line()