HTML code for icons. Currently only supports Font Awesome icons.

icon(name)

Arguments

name
string. name of the icon. You can see a full list of options at http://fontawesome.io/icons/.

Value

string containing the HTML code.

Note

Requires the Font Awesome HTML code: <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">

Examples

rmd <- ' ```{r} library(rchallenge) ``` <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"> `r icon("fa-user")` `r icon("fa-user fa-lg")` `r icon("fa-user fa-2x")` `r icon("fa-user fa-3x")` `r icon("fa-user fa-3x fa-border")` ' file <- tempfile() cat(rmd, file=file) writeLines(readLines(file))
#> #> ```{r} #> library(rchallenge) #> ``` #> <link rel="stylesheet" #> href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"> #> `r icon("fa-user")` #> `r icon("fa-user fa-lg")` #> `r icon("fa-user fa-2x")` #> `r icon("fa-user fa-3x")` #> `r icon("fa-user fa-3x fa-border")`
rmarkdown::render(file)
#> /usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS file4854d79fc09.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output file4854d79fc09.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template /home/adrien-alea/R/x86_64-pc-linux-gnu-library/3.3/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable 'theme:bootstrap' --include-in-header /tmp/Rtmp7NoKFA/rmarkdown-str485443c69232.html --mathjax --variable 'mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
#> #> Output created: file4854d79fc09.html