scripts/hex_sticker.R

library(hexSticker)
library(usethis)
library(magrittr)

logo_location <- "inst/img/logo.png"

sticker(
  subplot =
    png::readPNG("inst/img/hotwire.png") %>%
    grid::rasterGrob(interpolate = TRUE),
  package  = "hotwire.R",
  filename = logo_location,
  p_size   = 20,
  p_color  = "#191919",
  s_width  = 10,
  s_height = 1.35,
  s_x      = 0.95,
  s_y      = 0.905,
  h_color  = "#191919",
  h_fill   = "#ffe000"
)

file.remove("man/figures/logo.png")
use_logo(logo_location)
tjpalanca/hotwire.R documentation built on Dec. 23, 2021, 10:59 a.m.