Title: | SVG Icons for R Documents and Apps |
---|---|
Description: | Easily embed SVG icons into R Markdown documents or shiny apps. A collection of popular icon sets are supported by the package, including Font Awesome, Academicons and Ionicons. |
Authors: | Mitchell O'Hara-Wild [aut, cre], Earo Wang [ctb], Timothy Hyndman [ctb], Matthew T. Warkentin [ctb], Tom Jemmett [ctb] |
Maintainer: | Mitchell O'Hara-Wild <[email protected]> |
License: | GPL-3 |
Version: | 0.2.0 |
Built: | 2024-11-02 03:26:25 UTC |
Source: | https://github.com/mitchelloharawild/icons |
Academicons is a specialist icon font for academics. It contains icons for websites and organisations related to academia that are often missing from mainstream font packages. It can be used by itself, but its primary purpose is to be used as a supplementary package alongside a larger icon set.
download_academicons(version = "dev") academicons(name)
download_academicons(version = "dev") academicons(name)
version |
Version of the library |
name |
Name of the icon |
Bioicons is a free library of open source icons for scientific illustrations using vector graphics software such as Inkscape or Adobe Illustrator.
download_bioicons() bioicons(name, category = NULL)
download_bioicons() bioicons(name, category = NULL)
name |
Name of the icon. |
category |
The icon's category, one of "Animals", "Blood_immunology",
"Cell_lines", "Cell_membrane", "Chemistry", "Chemo-_and_Bioinformatics",
"General_items", "Genetics", "Human_physiology", "Intracellular_components"
, "Lab_apparatus", "Machine_Learning", "Microbiology",
"Nucleic_Acids", "Oncology", "Parasites", "Receptor_channels",
"Safety_symbols", "Scientific_graphs", "Tissues", or "Viruses".
If |
Feather Icons
download_feather_icons(version = "dev") feather_icons(name)
download_feather_icons(version = "dev") feather_icons(name)
version |
Version of the library |
name |
Name of the icon |
Font Awesome icons
download_fontawesome(version = "dev") fontawesome(name, style = NULL)
download_fontawesome(version = "dev") fontawesome(name, style = NULL)
version |
Version of the library |
name |
Name of the icon |
style |
Style of the icon. If NULL, a default style will be chosen for the specified icon. |
Google's Material design icons
download_google_material(version = "dev") google_material(name, category = NULL, theme = NULL)
download_google_material(version = "dev") google_material(name, category = NULL, theme = NULL)
version |
Version of the library |
name |
Name of the icon |
category |
The icon's category, either "action", "alert", "av", "communication", "content", "device", "editor", "file", "hardware", "home", "image", "maps", "navigation", "notification", "places", "social", or "toggle" |
theme |
The style variant for the icon, requires v4.0.0 or greater. Available themes vary by icon, but can be either "filled", "outlined", "round", "sharp", or "twotone". If NULL, it will default to the first available variant in this order. |
https://material.io/resources/icons/
Health icons
download_health_icons() health_icons(name, category = NULL, theme = NULL)
download_health_icons() health_icons(name, category = NULL, theme = NULL)
name |
Name of the icon |
category |
The icon's category, either "blood", "body", "conditions", "devices", "diagnostics", "emotions", "family", "medications", "objects", "people", "places", "shapes", "specialties", "symbols", "typography", or "vehicles" |
theme |
The style variant for the icon, requires v4.0.0 or greater. Available themes vary by icon, but can be either "filled", "negative", "outline". If NULL, it will default to the first available variant in this order. |
Ionicons icons
download_ionicons(version = "dev") ionicons(name)
download_ionicons(version = "dev") ionicons(name)
version |
Version of the library |
name |
Name of the icon |
GitHub's Octicons
download_octicons(version = "dev") octicons(name)
download_octicons(version = "dev") octicons(name)
version |
Version of the library |
name |
Name of the icon |
https://primer.style/octicons/
Simple Icons
download_simple_icons(version = "dev") simple_icons(name)
download_simple_icons(version = "dev") simple_icons(name)
version |
Version of the library |
name |
Name of the icon |
The icon package has been overhauled to be more efficient and extensible.
Unfortunately this has led to several necessary interface changes. To
minimise impact, please use the migrate_icon()
function to update your files
to use the new interface.
fa(...) ii(...) ai(...)
fa(...) ii(...) ai(...)
... |
Unused. |
Find icons in installed sets by name
icon_find(name, set = NULL)
icon_find(name, set = NULL)
name |
The name of the icon |
set |
Icon sets to search. If NULL, all available icons will be searched. |
This function will return TRUE
if the icons for an icon set are installed.
If they aren't, they can be installed using the appropriate download_*()
function.
icon_installed(x)
icon_installed(x)
x |
An icon set (such as |
Store icons in a local directory to simplify sharing of documents containing icons. Bundling icons with your document or app avoids the need for collaborators or servers to have all icons from a library installed.
icon_save(icons, path = ".")
icon_save(icons, path = ".")
icons |
A named list of icons, the names specify the icon's name in the new icon set. |
path |
A directory to save the icons into. |
if(icon_installed(fontawesome) && icon_installed(ionicons)){ icon_save( list(arrow = fontawesome$solid$`arrow-right`, alarm = ionicons$alarm), path = "icons" ) app_icons <- icon_set("icons") app_icons$arrow }
if(icon_installed(fontawesome) && icon_installed(ionicons)){ icon_save( list(arrow = fontawesome$solid$`arrow-right`, alarm = ionicons$alarm), path = "icons" ) app_icons <- icon_set("icons") app_icons$arrow }
Create a custom icon set
icon_set(path, meta = list(name = "Custom", version = NULL, license = NULL))
icon_set(path, meta = list(name = "Custom", version = NULL, license = NULL))
path |
Path to the icons |
meta |
Meta information for the icons |
Customise the style of an icon
icon_style(x, scale = NULL, fill = NULL, rotate = NULL, ...)
icon_style(x, scale = NULL, fill = NULL, rotate = NULL, ...)
x |
The icon to style. |
scale |
Scaled size of the icon. |
fill |
The colour for the fill. |
rotate |
The angle to rotate the icon. |
... |
Other CSS rules for the icon style, for example |
Read an individual icon
read_icon(x)
read_icon(x)
x |
Path to the icon |