R/latex_table.R
latex_range_sci.Rd
Make latex notation for best value and confidence boundaries.
latex_range_sci(
best,
min,
max,
ndigits = 0,
na = "-",
symmetry = FALSE,
base_pow = NULL
)
best value
lower boundary value
upper boundary value
number of digits after decimal point
show NA value as na. default na='-'
if errors are symmetric show as value+/-err
set to numeric if you want to make column with the same power.
character
x <- c(NA, 1e21, 3e22, 1e23)
err <- c(NA, 0.1e21, 0.5e21, 0.1e23)
latex_range_sci(best = x, min = x - err, max = x + err, ndigits = 2)
#> [1] "$-$" "$-$" "$-$" "$-$"
latex_range_sci(x, x - err, x + err, ndigits = 2, na = '', symmetry = TRUE)
#> [1] "$$" "$$" "$$" "$$"
latex_range_sci(x, x - err, x + err, ndigits = 2, base_pow=21)
#> [1] "$-$" "$-$" "$-$" "$-$"