pivotr("diamonds", cvars = "cut") %>% dtab
pivotr("diamonds", cvars = c("cut","clarity")) %>% dtab(format = "color_bar")
ret <- pivotr("diamonds", cvars = c("cut","clarity"), normalize = "total") %>%
dtab(format = "color_bar", perc = TRUE)
Run the code above in your browser using DataLab