tbl_cut_variables | R Documentation |
Create Cut Bins from a Numeric Variable
tbl_cut_variables( data, variables = NULL, breaks = NULL, remove_original_variables = F, override_labels = NULL, is_ordered_factor = T, digit_label = 10, include.lowest = T, right = T )
variables |
vector of variable names |
breaks |
if a a single number the number of breaks or a numeric vector with the breaks |
right |
library(ggplot2) library(asbtools) tbl_cut_variables(data = diamonds, variables = c("price", "table"), breaks = 10) tbl_cut_variables(data = diamonds, breaks = c(0, 1000, 5000, 15000, 20000), variable = "price", right = F, include.lowest = F) %>% count(price_0005_cut_bins_0_to_20000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.