# NOT RUN {
test_df <- data.table(
x = 1:3,
y = 4:6,
z = c("a", "a", "b"))
test_df %>%
count.()
test_df %>%
count.(z)
test_df %>%
count.(where(is.character))
test_df %>%
count.(z, wt = y, name = "y_sum")
test_df %>%
count.(z, sort = TRUE)
# }
Run the code above in your browser using DataLab