Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

num2Latex

Convert numeric containing e+-power


Description

Latex string with power notation

Usage

num2Latex(x, digits = 0)

Arguments

x

numerical vector

digits

digits to show, see also options scipen

Value

Vector of strings representing the given numbers, xe-y -> $x . 10 ^-y$

Author(s)

Examples

z <- c(1.5, 5e-12, 2.33e-03, 8.12e+10, 2)
 num2Latex(z)     #  1.5,  5 \cdot 10^{-12},  0.00233,  8.12 \cdot 10^{10},  2
 num2Latex(z, 2)  #  1.5,  5 \cdot 10^{-12},  2.33 \cdot 10^{-3},  8.12 \cdot 10^{10},  2 
 num2Latex(z, -3) #  1.5,  5 \cdot 10^{-12},  0.00233, 81200000000, 2

cwhmisc

Miscellaneous Functions for Math, Plotting, Printing, Statistics, Strings, and Tools

v6.6
GPL (>= 2)
Authors
Christian W. Hoffmann
Initial release
2018-08-24, 10:40:10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.