supsc | R Documentation |
The supsc
function translates a normal character to a UTF-8
superscript character. The function can be used to
generate superscripts for many common characters. Most alphabetic
and numeric characters have UTF-8 superscripts. This function is useful
because it saves you from having to look up the superscript character
code, or copy and pasting from the internet. If a corresponding
superscript character code does not exist, a question mark
will be returned for that character.
supsc(x)
x |
A string to be converted to superscript. |
The superscript version of the string passed to the function, if one exists. Otherwise, a question mark will be returned.
Other utf8:
subsc()
,
symbol()
# Single letter
paste0(supsc("a"), "Footnote")
# Single number
paste0(supsc("1"), "Footnote")
# Character string
paste0("December 5", supsc("th"))
# Formula
paste0("x", supsc("(a+1)"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.