Personal Themes and Formatting Preferences

A collection of utility functions, themes, and templates to support personal data analysis workflows. Includes functions for formatting numeric values as text, custom themes and color scales for 'ggplot2', and automatic formatting for tables created with 'gt'.


wjake wjake website

Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. lifecycle R packageversion Packagedownloads
R-CMD-check codecov pages-build-deployment
Signedby License

This is a personal R package containing utility functions and custom themes for ggplot2 and gt.

Installation

You can install the released version of wjake from CRAN with:

install.packages("wjake")

To install the development version from GitHub use:

# install.packages("remotes")
remotes::install_github("wjakethompson/wjake")

Examples

Create branded plots with theme_wjake():

library(ggplot2)

ggplot(penguins, aes(x = bill_len, y = flipper_len)) +
  geom_point(aes(color = species), na.rm = TRUE) +
  labs(
    x = "Bill length (mm)",
    y = "Flipper length (mm)",
    title = "Seminal ggplot2 scatterplot example",
    subtitle = "A plot that is only useful for demonstration purposes",
    caption = "Brought to you by \U1F427",
    color = "Species"
  ) +
  theme_wjake()

And tables with gt_theme_wjake():

library(gt)

head(penguins) |>
  gt() |>
  gt_theme_wjake(bg_color = "white") |>
  fmt_number(year, decimals = 0, use_seps = FALSE)
species island bill_len bill_dep flipper_len body_mass sex year
Adelie Torgersen 39.1 18.7 181  3,750  male 2007 
Adelie Torgersen 39.5 17.4 186  3,800  female 2007 
Adelie Torgersen 40.3 18.0 195  3,250  female 2007 
Adelie Torgersen NA NA NA NA NA 2007 
Adelie Torgersen 36.7 19.3 193  3,450  female 2007 
Adelie Torgersen 39.3 20.6 190  3,650  male 2007 
Table: @wjakethompson.com

Code of Conduct

Please note that the wjake project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("wjake")

1.0.1 by W. Jake Thompson, 4 months ago


https://github.com/wjakethompson/wjake, https://wjake.wjakethompson.com


Report a bug at https://github.com/wjakethompson/wjake/issues


Browse source code at https://github.com/cran/wjake


Authors: W. Jake Thompson [aut, cre, cph] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, colorspace, dplyr, english, ggplot2, ggtext, gh, glue, grDevices, gt, knitr, pak, rlang, rstudioapi, scales, showtextdb, stringr, sysfonts, systemfonts, xfun

Suggests spelling, taylor, testthat, vdiffr, withr


See at CRAN