tests/testthat/test-labeller.R

library(testthat)
library(ggplot2)

df <- data.frame( x=1:100, y=rnorm(100), grp=rep( letters[1:2], each=50 ))
p <- ggplot(df, aes(x=x, y=y)) + geom_point()

p + facet_grid( ". ~ grp", labeller=labeller(a="alpha", b="beta"))

Try the Kmisc package in your browser

Any scripts or data that you put into this service are public.

Kmisc documentation built on May 29, 2017, 1:43 p.m.