Calculate frequencies.
prodcalc(
data,
formula,
divider = mosaic(),
cascade = 0,
scale_max = TRUE,
na.rm = FALSE
)input data frame
formula specifying display of plot
divider function
cascading amount, per nested layer
Logical vector of length 1. If TRUE maximum values
within each nested layer will be scaled to take up all available space.
If FALSE, areas will be comparable between nested layers.
Logical vector of length 1 - should missing levels be silently removed?
prodcalc(happy, ~ happy, "hbar")
#> happy .wt l r b t level
#> 1 not too happy 5629 0.000 0.235 0 0.2175543 1
#> 2 pretty happy 25874 0.255 0.490 0 1.0000000 1
#> 3 very happy 14800 0.510 0.745 0 0.5720028 1
#> 4 <NA> 4717 0.765 1.000 0 0.1823066 1
prodcalc(happy, ~ happy, "hspine")
#> happy .wt l r b t level
#> 1 not too happy 5629 0.0000000 0.1070194 0 1 1
#> 2 pretty happy 25874 0.1170194 0.6089398 0 1 1
#> 3 very happy 14800 0.6189398 0.9003197 0 1 1
#> 4 <NA> 4717 0.9103197 1.0000000 0 1 1