symbol {common}R Documentation

Gets UTF-8 symbol characters

Description

The symbol function gets UTF-8 symbol characters. You can call this function to look up trademarks, Greek letters, and mathematical operators. The function uses HTML entity keywords to indicate which symbol to return. You may pass more than one keyword in a single call to get a combined result. Any characters not recognized as a keyword will be left alone. Characters surrounded by square brackets ([]) will be subscripted. Characters surrounded by square brackets and prefixed with an up arrow (^[]) will be superscripted.

Usage

symbol(keyword)

Arguments

keyword

A symbol keyword. This keyword follows HTML conventions. See the Keywords section for a complete list of all supported keywords.

Value

The requested UTF-8 symbol character or characters.

Keywords

The following symbol keywords are available:

See Also

Other utf8: subsc(), supsc()

Examples

# Trademark symbol
symbol("My Companytrade")

# Registered Trademark symbol
symbol("My Companyreg")

# Dagger symbol concatenated
paste0(symbol("dagger"), "My footnotes")

# Alpha squared
symbol("alpha^[2]")

# Greek Symbols
symbol("SigmaPsiZeta")

# Useful Math Symbols
symbol("asymp ge le ne plusmn empty fnof radic sum")

# Useful Logical Symbols
symbol("forall isin notin cup cap and or")

# Chemistry
symbol("2H[2] + O[2] barr 2H[2]O")

[Package common version 1.1.3 Index]