tests/eaxis.R
raw| 1 | library(sfsmisc) |
| 2 | expo <- -3:4 |
| 3 | stopifnot(exprs = { |
| 4 | all.equal(pretty10exp(10^expo, drop.1=TRUE, sub10 = c(-2, 2)), |
| 5 | expression(10^-3, 0.01, 0.1, 1, 10, 100, 10^3, 10^4)) |
| 6 | |
| 7 | identical(pretty10exp(10^expo, drop.1=TRUE, sub10 = c(-2, 2), lab.type="latex"), |
| 8 | c("$10^{-3}$", "0.01", "0.1", "1", "10", "100", |
| 9 | "$10^{3}$", "$10^{4}$")) |
| 10 | ## gave exponential format for "latex" case. |
| 11 | }) |