README.md

llamar

A set of custom reusable plotting functions in R

installation

install.packages("devtools")

library(devtools)

devtools::install_github("flaneuse/llamar")

library(llamar)

installing and loading useful R packages

R has some wonderful packages that extend the functionality of base R. However, I get tired of loading the same libraries every time... so I created a bundler to do the work for me. To use, load llamar and call loadPkgs

library(llamar) loadPkgs()

themes

The primary function of llamar is developing a set of custom, pre-defined clean themes, building off Hadley Wickham's awesome ggplot2 package.

All examples use the inbuilt mtcars dataset:

p = ggplot(mtcars, aes(x = mpg, y = wt, colour = cyl)) + geom_point() + ggtitle('title')

themes with gridlines

theme_basic

p + theme_basic()

theme_basic

theme_xygrid

p + theme_xygrid()

theme_xygrid

theme_xgrid

p + theme_xgrid()

theme_xgrid

theme_ygrid

p + theme_ygrid()

theme_ygrid

themes without gridlines

theme_blank

p + theme_blank()

theme_blank

theme_xaxis

p + theme_xaxis()

theme_xaxis

theme_yaxis

p + theme_yaxis()

theme_yaxis

theme_xylab

p + theme_xylab()

theme_xylab

theme_labelsOnly

p + theme_labelsOnly()

theme_labelsOnly



flaneuse/llamar documentation built on May 16, 2019, 1:18 p.m.