Description Usage Arguments Value
Computes the weighted mean of a target variable accross one or two dimensions. The first dimension (variable) is meant to be plotted along the x-axis, while the values of the second variable will be mapped to color aesthetics.
1 2 |
data |
The data to segment. |
target |
Name of the target variable. |
var |
Character, name of the variable to segment accross. |
var2 |
Optional, character name of the 2nd variable. This is useful to see interaction between two variables and a target variable. |
weight |
Optional, name of the variable in 'data' to be used as weights in the weighted average calculation. |
exposure |
Optional, name of the variable in 'data' that represents the exposure. This will be shown as bars when plotted. |
quantiles |
Should 'var' be quantilized ? If an integer, represents the number of quantiles to use. If TRUE, 5 quantiles will be used. |
labels |
Labels to use for 'var' quantiles. Default is to show the interval bounds. |
quantiles2 |
Should 'var2' be quantilized ? If an integer, represents the number of quantiles to use. If TRUE, 5 quantiles will be used. |
laels2 |
Labels to use for 'var2' quantiles. Default is to show the interval bounds. |
A summarized dataset.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.