if (FALSE) {
cube1 <- crtabs(~allpets, ds)
cubeMeasureType(cube1)
#> "count"
cube2 <- crtabs(list(a = n(), b = mean(age)) ~ allpets, ds)
cubeMeasureType(cube2)
#> "count"
cubeMeasureType(cube2, "b")
#> "mean"
}
Run the code above in your browser using DataLab