sciNot: Convert numeric vector to character in scientific notation.

View source: R/sciNot.R

sciNotR Documentation

Convert numeric vector to character in scientific notation.

Description

Convert numeric vector to character in scientific notation.

Usage

sciNot(x)

Arguments

x

Numeric vector.

Details

Takes a numeric vector, x, and returns a corresponding character vector the same length as x. Elements of the return vector are representations of corresponding elements of x in scientific notation. This is handy for use with 'labels' argument to ggplot2:: 'scales' functions:

scales_x_log10(labels=sciNot)

Value

Character vector the same length as x, containing representation in scientific notation of each element in x.

Author(s)

David Braze davebraze@gmail.com

See Also

scale_continuous


davebraze/FDButils documentation built on Feb. 24, 2023, 12:14 a.m.