icon: HTML code for icons.

Description Usage Arguments Value Note Examples

View source: R/display.r

Description

Currently only supports Font Awesome icons.

Usage

1

Arguments

name

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

Value

string containing the HTML code.

Note

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
rmd <- '
```{r}
library(rchallenge)
```
<link rel="stylesheet" 
 href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/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))
if (rmarkdown::pandoc_available('1.12.3')) {
  rmarkdown::render(file)
}

adrtod/rchallenge documentation built on March 23, 2021, 7:43 a.m.