Learn R Programming

wrMisc (version 1.5.2)

htmlSpecCharConv: Html special character conversion

Description

Converts 'txt' so that (the most common) special characters (like 'beta','micro','square' etc) will be displayed correctly whe used for display in html (eg at mouse-over). Note : The package stringi is required for the conversions (the input will get returned if stringi is not available).

Usage

htmlSpecCharConv(txt, callFrom = NULL)

Arguments

txt

character vector inclusing special characters

callFrom

(character) allow easier tracking of message produced

Value

corrected character vector adopted to html display

See Also

tables on https://www.htmlhelp.com/reference/html40/entities/latin1.html, https://www.degraeve.com/reference/specialcharacters.php, https://ascii.cl/htmlcodes.htm

Examples

Run this code
# NOT RUN {
(x <- stringi::stri_unescape_unicode("\\u00b5\\u003d\\u0061\\u0062"))
htmlSpecCharConv(x)
# }

Run the code above in your browser using DataLab