/themeresolved

R package for a ggplot2 resolved theme in line with the company house style

themeresolved

R package for a ggplot2 resolved theme in line with the company house style

Installation

Installation can be done through devtools from the github repo directly. Please make sure that:

  1. You have an account on github with access permissions to beresolved
  2. You have created an access token for your account
  3. You have added that access token to your .Renviron through the GITHUB_PAT variable

For 3, use the usethis package. Then call

usethis::edit_r_environ()

and add: GITHUB_PAT= * YOUR_TOKEN_FROM_GITHUB * When this is done, simple use:

library(devtools)
devtools::install_github('beresolved/themeresolved',ref='v1')

Please note the ref setting. The code is not in the default master branch, but in the v1 branch.

Example usage

To use the package:

library(themeresolved)
library(ggplot2)
theme_set(theme_resolved())
ggplot(iris,aes(x=Sepal.Width,y=Sepal.Length,color=Species))+geom_point()+facet_grid(Species~.)

All of your plots will be styled using this theme until you restart your R session.

A note on font use

By default, theme_resolved uses Lato and Oswald font families (Lato being the base family). Please ensure that:

  1. These fonts are properly installed on your system
  2. These fonts are known by R/Rstudio

To include the fonts in R/Rstudio, please use the extrafont package (and extrafontdb). For an excellent blog on how to do this have a look at this one.