Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r4fun/icongram
:v: Icongram for R
https://github.com/r4fun/icongram
icongram icons rstats shiny
Last synced: 3 months ago
JSON representation
:v: Icongram for R
- Host: GitHub
- URL: https://github.com/r4fun/icongram
- Owner: r4fun
- License: other
- Created: 2020-08-14T23:47:48.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-18T01:56:13.000Z (about 4 years ago)
- Last Synced: 2024-01-28T23:08:15.223Z (9 months ago)
- Topics: icongram, icons, rstats, shiny
- Language: R
- Homepage: https://r4fun.github.io/icongram/
- Size: 435 KB
- Stars: 32
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- awesome-shiny-extensions - icongram - Interface to Icongram, easily fetch svg icons with a single function. (UI Components / Icon Font)
- jimsghstars - r4fun/icongram - :v: Icongram for R (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)library(icongram)
```# icongram
[![R build status](https://github.com/r4fun/icongram/workflows/R-CMD-check/badge.svg)](https://github.com/r4fun/icongram/actions)
`r scales::comma(nrow(igrams))` icons for shiny development thanks to [icongram](https://icongr.am).
```{r, echo=FALSE}
knitr::include_graphics("man/figures/demo.png")
```## Installation
You can install the development version of icongram from GitHub with:
``` r
# install.packages("devtools")
devtools::install_github("r4fun/icongram")
```## Example
Return an icon by calling `igram`:
```r
igram(
icon = "r",
lib = "simple",
size = 128,
color = "default" # alternatively, a hexcode
)
```Icon information is stored in `igrams`:
```{r}
igrams
```A small shiny example:
```r
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`:
```r
igram("r", raw = TRUE)
``````{r, echo=FALSE}
print(igram("r", raw = TRUE))
```