sci_fmt_pm: Convert ASCII Scientific Notation into 'plotmath' Form

View source: R/text_util.bare.R

sci_fmt_pmR Documentation

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)

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.

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_

See Also

plotmath, paste_text


tablesgg documentation built on June 22, 2024, 11:02 a.m.