scripts/hex_sticker.R

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

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

sticker(
  subplot =
    png::readPNG("inst/img/database.png") %>%
    grid::rasterGrob(interpolate = TRUE),
  package  = "dbtools",
  filename = logo_location,
  p_size   = 20,
  p_color  = "#008080",
  s_width  = 10,
  s_height = 1,
  s_x      = 1,
  h_color  = "#008080",
  h_fill   = "#fafafa"
)

file.remove("man/figures/logo.png")
use_logo(logo_location)
tjpalanca/dbtools documentation built on Oct. 7, 2021, 6:43 a.m.