# NOT RUN {
x <- c(-1e+09, 0, NA, pi * 10^(-5:5))
ToScientific(x, digits = 5L, na = "---")
ToScientific(x, digits = 2L, scipen = 0L)
x <- exp(log(10) * 1:6)
i <- seq_along(x)
plot(i, i, type = "n", xaxt = "n", yaxt = "n", ann = FALSE)
lab <- ToScientific(x, 0L, type = "plotmath", scipen = 0L, big.mark = ",")
axis(1, i, labels = lab)
axis(2, i, labels = lab)
# }
Run the code above in your browser using DataLab