icon {rchallenge} | R Documentation |
HTML code for icons.
Description
Currently only supports Font Awesome icons.
Usage
icon(name)
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
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)
}
[Package rchallenge version 1.3.4 Index]