Create your own hexagon in R

This is a super fast and easy way to create your first hexagon in R.

Enjoy !!!

# install.packages("hexSticker")
library(hexSticker)
## Warning: package 'hexSticker' was built under R version 4.0.5
imgurl <- "./logo.png"

plot(
  sticker(
    imgurl,
    package = "",
    # p_size = 26,
    # p_color = "black",
    
    # p_x = 1,
    # p_y = 1.5,
    
    s_x = 1,
    s_y = 1,
    s_width = 0.9,
    # s_height = 0.4,
    h_fill = "gray100",
    h_color = "black",
    h_size = 2,
    # spotlight = T,
    asp = 0.86,
    # filename = "inst/figures/imgfile.png"
    filename = "./imgfile.png"
  )
)

knitr::include_graphics("./imgfile.png")

Mike Nguyen
Mike Nguyen
PhD Candidate

My research interests include marketing, and social science.

Related