dropLast | R Documentation |
Primarily used to strips totals from a table bordered by totals by dropping the last facet.
dropLast(arr, drop = FALSE, keep = NULL)
arr |
array |
drop |
drop parameter in subsetting, default FALSE |
keep |
names of facets to be kept, default NULL |
(arr <- array(1:24,2:4))
arr %>% dropLast
arr %>% dropLast(drop = TRUE)
tab(iris, ~ Species)
tab(iris, ~ Species) %>% dropLast
tab(iris, ~ Species + I(Sepal.Length > 5)) %>% dropLast
# row percentages:
tab(iris, ~ Species + I(Sepal.Length > 5), pct= 1)
tab(iris, ~ Species + I(Sepal.Length > 5), pct= 1) %>% dropLast
tab(iris, ~ Species + I(Sepal.Length > 5), pct= 1) %>% dropLast(keep = "All")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.