Description Usage Arguments Details Value Examples
Replaces HTML markup. The angle braces are removed and the HTML symbol markup is replaced with equivalent symbols.
1 | replace_html(x, symbol = TRUE, ...)
|
x |
The text variable. |
symbol |
logical. If codeTRUE the symbols are retained with appropriate
replacements. If |
... |
Ignored. |
Replacements for symbols are as follows:
| html | symbol |
| © | (c) |
| ® | (r) |
| ™ | tm |
| “ | " |
| ” | " |
| ‘ | ' |
| ’ | ' |
| • | - |
| · | - |
| ⋅ | [] |
| – | - |
| — | - |
| ¢ | cents |
| £ | pounds |
| € | euro |
| ≠ | != |
| ½ | half |
| ¼ | quarter |
| ¾ | three fourths |
| ° | degrees |
| ← | <- |
| → | -> |
| … | ... |
| | |
| < | < |
| > | > |
| « | << |
| » | >> |
| & | & |
| " | " |
| ' | ' |
| ¥ | yen |
Returns a vector with HTML markup replaced.
1 2 3 4 5 6 7 8 | x <- c(
"<bold>Random</bold> text with symbols: < > & " '",
"<p>More text</p> ¢ £ ¥ € © ® « »"
)
replace_html(x)
replace_html(x, FALSE)
replace_white(replace_html(x, FALSE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.