The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

icons

R-CMD-check lifecycle CRAN_Status_Badge

The icons package for R makes adding web icons to reports, presentations and apps easy. It integrates many popular icon libraries from around the web with a simple interface that works with any rmarkdown output format. If a particular icon library is not explicitly supported by this package, you can still use it by creating a custom icon set from a folder of SVG files. Icons provide flexible means of digital expression, allowing expressions and functionality beyond what is possible with emoji.

The icons package currently provides helpful tools for downloading and using icons from these libraries:

Installation

The released version can be installed from CRAN using:

install.packages("icons")

The development version can be installed from GitHub using:

# install.packages("remotes")
remotes::install_github("mitchelloharawild/icons")

Once you’ve installed the package you’ll also need to download some icons! Supported icon libraries (listed above) can be downloaded using the download_*() functions. For example, to download the Font Awesome icons you would use download_fontawesome().

Usage

library(icons)

Icons can be inserted inline using inline code `r icons::fontawesome("rocket", style = "solid")` or `r icons::fontawesome$solid$rocket` .

Icons can also be inserted using usual R chunks.

```{r icon-chunk}
fontawesome("rocket", style = "solid") # equivalent to icons::fontawesome$solid$rocket
```

If the icon name contains non-syntactic name characters like a - or +, you will need to quote the name with backticks, single or double quotes:

fontawesome$brands$`r-project` # or 'r-project' or "r-project"

The appearance of an icon can be customised using the icon_style() function.

```{r icon-style}
icon_style(fontawesome("rocket", style = "solid"), scale = 2, fill = "red")
```

Custom icon sets can be created using the icon_set() function, which accepts a directory of SVG files and allows them to be used as icons.

```{r icon-custom}
custom <- icons::icon_set("hex")
custom$icons
```

You can also search for icons using the icon_find() function, which returns a vector of matching icons. Use icon_label() to see which icon set and name each match came from.

found <- icon_find("rocket")
found

icon_label(found)
#> [1] "ionicons$rocket"          "fontawesome$solid$rocket"

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.