diff --git a/R/num.R b/R/num.R index 00dfeb66c..81179e10a 100644 --- a/R/num.R +++ b/R/num.R @@ -127,7 +127,7 @@ vec_arith.numeric.pillar_num <- vec_arith.pillar_num.default vec_math.pillar_num <- function(.fn, .x, ...) { "!!!!DEBUG vec_math(`v(.fn)`)" - out <- vec_math_base(.fn, vec_proxy(.x)) + out <- vec_math_base(.fn, vec_proxy(.x), ...) if (is.numeric(out)) { out <- vec_restore(out, .x) diff --git a/tests/testthat/_snaps/ggplot2/log-scale.svg b/tests/testthat/_snaps/ggplot2/log-scale.svg index 14010270d..89530a950 100644 --- a/tests/testthat/_snaps/ggplot2/log-scale.svg +++ b/tests/testthat/_snaps/ggplot2/log-scale.svg @@ -20,54 +20,50 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + -10n -1m -100 -10M -25 -50 -75 -100 -x - [ -10 --3 -] +1m +1 +1k +25 +50 +75 +100 +x + [ +10 +-3 +] z -log_scale +log_scale diff --git a/tests/testthat/_snaps/num.md b/tests/testthat/_snaps/num.md index e4d684c4b..e9a0473c2 100644 --- a/tests/testthat/_snaps/num.md +++ b/tests/testthat/_snaps/num.md @@ -467,6 +467,11 @@ Output [1] 84.1 90.9 14.1 + Code + sum(num(c(1:3, NA)), na.rm = TRUE) + Output + + [1] 6 # formatting diff --git a/tests/testthat/test-ggplot2.R b/tests/testthat/test-ggplot2.R index 9c223847f..8486ea2f5 100644 --- a/tests/testthat/test-ggplot2.R +++ b/tests/testthat/test-ggplot2.R @@ -19,7 +19,7 @@ test_that("ggplot2 snapshot tests", { log_scale <- ggplot2::ggplot(data, ggplot2::aes(x, z)) + ggplot2::geom_point() + - scale_y_num(trans = "log10") + + scale_y_num(transform = "log10") + ggplot2::theme_minimal(36) vdiffr::expect_doppelganger("log_scale", log_scale) diff --git a/tests/testthat/test-num.R b/tests/testthat/test-num.R index 759bbb271..dd207ad48 100644 --- a/tests/testthat/test-num.R +++ b/tests/testthat/test-num.R @@ -170,6 +170,7 @@ test_that("mathematics", { min(num(1:3, label = "$")) mean(num(1:3, notation = "eng")) sin(num(1:3, label = "%", scale = 100)) + sum(num(c(1:3, NA)), na.rm = TRUE) }) })