Learn R Programming

textclean (version 0.3.0)

replace_html: Replace HTML Markup

Description

Replaces HTML markup. The angle braces are removed and the HTML symbol markup is replaced with equivalent symbols. Replacements for symbols are as follows:

Usage

replace_html(x, symbol = TRUE, ...)

Arguments

x
The text variable.
symbol
lofical. If codeTRUE the sybols are retained with appropriate replacments. If FALSE they are removed.
...
Ignored.

Value

Returns a vector with HTML markup replaced.

Details

html
symbol
 
<
<
>
>
&
&
"
"
'
'
¢
cents
£
pounds
¥
yen
euro
©
(c)
®
(r)

Examples

Run this code
x <- c(
    "<bold>Random</bold> text with symbols:   < > & " '",
    "<p>More text</p> ¢ £ ¥ € © ®"
)

replace_html(x)
replace_html(x, FALSE)

Run the code above in your browser using DataLab