jake RSS


jakehofman.com

Archive

Jan
19th
Thu
permalink

tip: rstats

use geom_line(aes(group=1)) to connect x-axis factors via a line with ggplot2 (h/t @hadleywickham)

tips  rstats 
Jan
18th
Wed
permalink

tip: rstats

a handy syntax reference for specifying statistical models in R: http://bit.ly/yza8SK

tips  rstats 
permalink

tip: rstats

hide part of a legend in ggplot2 with legend=F in the scale, e.g. scale_size(legend=F)

tips  rstats 
permalink

tip: rstats

(ab)use ggplot2 to connect x-axis factors via a line with geom_line(aes(x=as.integer(x), y=…))

tips  rstats 
Jan
11th
Tue
permalink

tip: rstats

use expand.grid to create a dataframe w/ all combinations of given vectors and factors http://bit.ly/dOeFUV

tips  rstats 
Nov
19th
Fri
permalink

tip: rstats

use opts(legend.position=c(0.85,0.85)) to move ggplot legends to upper right corner (h/t @drewconway)

tips  rstats 
Nov
17th
Wed
permalink

tip: rstats

to remove legend titles in ggplot, use opts(legend.title=theme_blank())

tips  rstats 
Nov
9th
Tue
permalink

tip: rstats

use opts(axis.text.x=theme_text(angle=45, hjust=1)) to rotate x axis labels in ggplot

tips  rstats