Nothing
context("treemap_squarified()")
G20_onezero <- G20_allzero <- G20
G20_onezero[1, "gdp_mil_usd"] <- 0
G20_allzero$gdp_mil_usd <- rep(0, nrow(G20_allzero))
test_that("treemap_squarified() correctly handles tiles with areas of 0", {
expect_silent(treemap_squarified(G20_onezero, area = "gdp_mil_usd"))
expect_error(treemap_squarified(G20_allzero, area = "gdp_mil_usd"), "area > 0")
})
context("treemap_fixed()")
test_that("treemap_fixed() correctly handles tiles with areas of 0", {
expect_silent(treemap_fixed(G20_onezero, area = "gdp_mil_usd"))
expect_error(treemap_fixed(G20_allzero, area = "gdp_mil_usd"), "area > 0")
})
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.