Nothing
library(testthat)
library(ggplot2)
test_that("scale_y_pareto validates sum_abs", {
expect_error(scale_y_pareto(sum_abs = 0), "positive finite")
expect_error(scale_y_pareto(sum_abs = c(1, 2)), "positive finite")
expect_error(scale_y_pareto(sum_abs = NA_real_), "positive finite")
})
test_that("scale_y_pareto adds a secondary axis", {
sc <- scale_y_pareto(sum_abs = 10)
expect_s3_class(sc, "ScaleContinuousPosition")
expect_false(is.null(sc$secondary.axis))
})
test_that("scale_y_pareto default secondary transform scales to axis maximum", {
sc <- scale_y_pareto()
transform <- sc$secondary.axis$trans
expect_equal(transform(c(0, 5, 10)), c(0, 50, 100))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.