The classes themselves are not exported (the package's surface is its
functions), so these are how calling code asks. Build a scale with
scale_from_leaftable() and a product with scale_product().
scale_is(x)
scale_is_product(x)A single TRUE or FALSE. A product is NOT a scale: it holds
several and materialises no atoms of its own.
Named with the object prefix rather than is_scale(), which ggplot2
already exports.
scale_is(scale_example())
#> [1] TRUE
scale_is(data.frame(unit = "U1"))
#> [1] FALSE
scale_is_product(scale_product(a = scale_example(), b = scale_example2()))
#> [1] TRUE