knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(icongram)
r scales::comma(nrow(igrams))
icons for shiny development thanks to icongram.
knitr::include_graphics("man/figures/demo.png")
You can install the development version of icongram from GitHub with:
# install.packages("devtools") devtools::install_github("r4fun/icongram")
Return an icon by calling igram
:
igram( icon = "r", lib = "simple", size = 128, color = "default" # alternatively, a hexcode )
Icon information is stored in igrams
:
igrams
A small shiny example:
library(shiny) library(icongram) ui <- fluidPage( fluidRow( column( width = 12, align = "center", h1("icongram for shiny"), igram("r"), br(), tags$code('icongram::igram("r")') ) ) ) server <- function(input, output, session) { } shinyApp(ui, server)
To view the raw HTML, use raw = TRUE
:
igram("r", raw = TRUE)
print(igram("r", raw = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.