knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The rainbowr
package generates LGBT pride flags overlaid with the R logo
The package can be installed from GitHub with:
# install.packages("devtools") devtools::install_github("djnavarro/rainbowr")
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()
rainbow_hex <- make_hex("rainbow") plot(rainbow_hex) trans_hex <- make_hex("transgender", palette = c("grey50", "black")) plot(trans_hex)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.