Learn R Programming

greekLetters (version 0.0.7)

greeks: Function that returns strings with Greek letters

Description

Function to obtain strings with Greek letters and mathematical symbols with or without subscripts and superscripts

Usage

greeks(greekletter)

Value

Returns the desired Greek letter or mathematical symbol in string format.

Format

A named list, see names(greek) for all Greek letters and mathematical symbols names.

Arguments

greekletter

is a string that contains the Greek letter name.

Author

Kévin Allan Sales Rodrigues.

Details

It is recommended that the font size of the R console be increased for better visualization of the symbols, as some of the symbols are quite small.

The subscripts and supersripts are restricted to numbers 0 to 9.

Examples

Run this code


if (FALSE) {

greeks("sigma^2")

greeks("Delta^5")


greeks("yourname^9")

#all Greek letters and mathematical symbols names
greek_vector

#all Greek letters and mathematical symbols names
greek

# testing statistical hypothesis
paste(greeks("H_0"),":", greek$mu, " = 0", "versus", greeks("H_1"), ":", greek$notEqual, " 0" )

# returns the Greek letters
cat("The Greek letters", greek$alpha, greek$beta, "...", greek$omega, sep=", ")
}

Run the code above in your browser using DataLab