HTML Special Characters

Usage

SC(text, copy2clip = interactive())

Arguments

text
A character vector or text copied to the clipboard. Default is to read from the clipboard.
copy2clip
logical. If TRUE attempts to copy the output to the clipboard.

Value

Returns an HTML special character entity.

Description

A system to produce HTML special characters.

Details

The general use of SCis to provide a character string of length 2. The first character is a letter and the second is one of the following symbols: c("'", "`", ":", "~", "^", "/", "o", ",") Which corresponds to: c("acute", "grave", "uml", "tilde", "circ", "slash", "ring", "cedil") See examples for cases not conforming to this use.

Warning

The user can create non-HTML characters with SC that will not be converted (i.e., SC("b~") would yield "&btilde;" and would not be converted appropriately).

Examples

SC("A'")
[1] "Á"
SC('a\'') #can use single quotes with escape
[1] "á"
SC("a`")
[1] "à"
SC("n~")
[1] "ñ"
SC("o:")
[1] "ö"
SC("(c)")
[1] "©"
SC("(r)")
[1] "®"
SC("c|")
[1] "¢"
SC("o/")
[1] "ø"
SC("ao")
[1] "å"
SC("c,")
[1] "ç"
SC("p")
[1] "¶"
SC("P")
[1] "¶"
SC("E")
[1] "€"
SC("Y")
[1] "¥"
SC("/")
[1] "÷"
SC("+-")
[1] "±"
SC("L")
[1] "£"
SC("tm")
[1] "™"
SC("S")
[1] "§"
SC("<")
[1] "<"
SC(">")
[1] ">"
SC("~")
[1] "~"
SC("o")
[1] "°"
SC("_")
[1] "_"
SC("...")
[1] "…"