Description Usage Arguments Value
Creates a "melted" dataframe of frequencies and probabilities for binned values
1 2 |
df |
Dataframe with 2 columns. |
var |
Column name of variable to bin |
group |
Column name of group |
breaks |
Numeric, vector of bin ranges |
style |
String, any "breaks" type compatible with classInterval(). Default is "pretty". |
n |
Numeric, number of bins, as used by classInterval(). Default is 5. |
midpoints |
Logical, whether to use midpoints for labels. Otherwise, ranges are used. Default is TRUE. |
melt |
Logical, whether not to melt() the data |
signif |
Integer, the number of digits used in formatting the break numbers. Default is 5. |
... |
Arguments to be passed to the functions called in each style used by classIntervals() |
Two option: If melt = FALSE, returns the original dataframe with mid-points or ranges for the variable (with suffixes "_mid" or "_bin"). If melt = TRUE, a table of frequencies ("freq"), and densitities ("dens") for each group if "group" parameter is used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.