knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

rainbowr

Travis build status Lifecycle: experimental CRAN status

The rainbowr package generates LGBT pride flags overlaid with the R logo

Installation

The package can be installed from GitHub with:

# install.packages("devtools")
devtools::install_github("djnavarro/rainbowr")

Example 1: LGBT banners

library(magick)
library(rainbowr)

rainbow_flag <- make_banner("rainbow")
plot(rainbow_flag)

trans_flag <- make_banner("transgender")
plot(trans_flag)

The flags are taken from the Wikipedia page for LGBT symbols and the Wikicommons page for Sexual identity symbols, but is not exhaustive. To see which flags are included:

list_flags()

Example 2: LGBT hexes

rainbow_hex <- make_hex("rainbow")
plot(rainbow_hex)

trans_hex <- make_hex("transgender", palette = c("grey50", "black"))
plot(trans_hex)

Example 3: Tiled LGBT hexes

df <- data.frame(
  flag = c("rainbow", "transgender", "bisexual", "bear", "aromantic", "lesbian"),
  palette1 = c("white", "grey80", "#ccccff", "grey30", "grey50", "grey50"),
  palette2 = c("black", "black", "white", "brown", "black", "lavender"),
  row = c(1, 1, 2, 3, 3, 2),
  col = c(1, 2, 1, 2, 3, 3),
  stringsAsFactors = FALSE
)

hextile <- make_hextile(df)
plot(hextile)


djnavarro/rainbowr documentation built on July 9, 2020, 7:26 a.m.