Learn R Programming

tablesgg (version 0.9-1)

sci_fmt_pm: Convert ASCII Scientific Notation into plotmath Form

Description

Convert numbers formatted as ASCII scientific notation (e.g., "1.2e-01") into plotmath form that will display the exponent as "10" with a superscript. This is an internal function not intended to be called by package users.

Usage

sci_fmt_pm(x)

Value

A character vector with the same length as x. Any elements that are to be treated as plotmath expressions will begin with the characters MATH_

Arguments

x

A character vector. Each element should contain text representing a single number. Those elements for which the text indicates a number in scientific notation will be converted.

See Also

plotmath, paste_text