The accessors group_names() and n_groups() have been added. These do what one would expect, and there is an additional replacement feature for group_names() that allows one to fix spelling errors:
library(incidence)
set.seed(9)
x <- rpois(100, 10)
grp <- sample(c("child", "adult", "adlut"),
100,
prob = c(0.45, 0.45, 0.05),
replace = TRUE)
i <- incidence(x, group = grp)
plot(i)
The accessors
group_names()
andn_groups()
have been added. These do what one would expect, and there is an additional replacement feature forgroup_names()
that allows one to fix spelling errors:Created on 2018-09-12 by the reprex package (v0.2.0).