sci_label: Convert integers to scientific notation labels

View source: R/violin_functions.R

sci_labelR Documentation

Convert integers to scientific notation labels

Description

Convert integers to scientific notation labels

Usage

sci_label(in_num, sig_figs = 2, type = "plot")

Arguments

in_num

a numeric vector

sig_figs

a number indicating how many significant figures should be displayed.

Value

a character vector with numeric values reformatted in 1.2E3 format

Examples

my_numbers <- c(100,15.359,32687,.000468)

sci_label(my_numbers)

sci_label(my_numbers,sig_figs=3)

AllenInstitute/L5_VEN documentation built on July 31, 2022, 6:32 p.m.