exponent: Exponent of a number in scientific notation

View source: R/sci_notation.R

exponentR Documentation

Exponent of a number in scientific notation

Description

Returns the exponent of a number as it is written in scientific notation (powers of 10).

Usage

exponent(x)

Arguments

x

(required) numeric. A number.

Value

the exponent of the scientific notation representation of the number x

References

Thanks to Stackoverflow answer by Paul McMurdie https://stackoverflow.com/a/25555105

Examples

 x <- c(1,400,500000,.0003)
 exponent(x)

tomhopper/numbr documentation built on Nov. 5, 2022, 11:35 p.m.