create_rank_combine | R Documentation |
Create pairwise combinations of HR variables and compute an average of a specified advanced insights metric.
create_rank_combine(data, hrvar = extract_hr(data), metric, mingroup = 5)
data |
A Standard Person Query dataset in the form of a data frame. |
hrvar |
String containing the name of the HR Variable by which to split
metrics. Defaults to |
metric |
Character string containing the name of the metric, e.g. "Collaboration_hours" |
mingroup |
Numeric value setting the privacy threshold / minimum group size. Defaults to 5. |
This function is called when the mode
argument in create_rank()
is
specified as "combine"
.
Data frame containing the following variables:
hrvar
: placeholder column that denotes the output as "Combined"
.
group
: pairwise combinations of HR attributes with the HR attribute
in square brackets followed by the value of the HR attribute.
Name of the metric (as passed to metric
)
n
# Use a small sample for faster runtime
pq_data_small <- dplyr::slice_sample(pq_data, prop = 0.1)
create_rank_combine(
data = pq_data_small,
metric = "Email_hours",
hrvar = c("Organization", "FunctionType", "LevelDesignation")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.