tb(freq(iris$Species))
tb(descr(iris, stats = "common"))
data("tobacco")
tb(stby(tobacco, tobacco$gender, descr, stats = "fivenum",check.nas = FALSE),
order=3)
tb(stby(tobacco, tobacco$gender, descr, stats = "common", useNA = TRUE))
# Compare stby() and group_by() groups' ordering
tb(with(tobacco, stby(diseased, list(gender, smoker), freq, useNA = TRUE)))
if (FALSE) {
tobacco |> dplyr::group_by(gender, smoker) |> freq(diseased) |> tb()
}
Run the code above in your browser using DataLab