2021-03-23 15:41:58 +03:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
% Please edit documentation in R/create_rank.R
|
|
|
|
\name{create_rank_combine}
|
|
|
|
\alias{create_rank_combine}
|
|
|
|
\title{Create combination pairs of HR variables and run 'create_rank()'}
|
|
|
|
\usage{
|
2021-03-30 18:03:54 +03:00
|
|
|
create_rank_combine(data, hrvar = extract_hr(data), metric, mingroup = 5)
|
2021-03-23 15:41:58 +03:00
|
|
|
}
|
|
|
|
\arguments{
|
|
|
|
\item{data}{A Standard Person Query dataset in the form of a data frame.}
|
|
|
|
|
|
|
|
\item{hrvar}{String containing the name of the HR Variable by which to split
|
|
|
|
metrics. Defaults to \code{"Organization"}. To run the analysis on the total
|
|
|
|
instead of splitting by an HR attribute, supply \code{NULL} (without quotes).}
|
|
|
|
|
|
|
|
\item{metric}{Character string containing the name of the metric,
|
|
|
|
e.g. "Collaboration_hours"}
|
|
|
|
|
|
|
|
\item{mingroup}{Numeric value setting the privacy threshold / minimum group
|
|
|
|
size. Defaults to 5.}
|
|
|
|
}
|
2021-03-30 18:03:54 +03:00
|
|
|
\value{
|
|
|
|
Data frame containing the following variables:
|
|
|
|
\itemize{
|
|
|
|
\item \code{hrvar}: placeholder column that denotes the output as \code{"Combined"}.
|
|
|
|
\item \code{group}: pairwise combinations of HR attributes with the HR attribute
|
|
|
|
in square brackets followed by the value of the HR attribute.
|
|
|
|
\item Name of the metric (as passed to \code{metric})
|
|
|
|
\item \code{n}
|
|
|
|
}
|
|
|
|
}
|
2021-03-23 15:41:58 +03:00
|
|
|
\description{
|
2021-03-30 18:03:54 +03:00
|
|
|
Create pairwise combinations of HR variables and compute an average of a
|
|
|
|
specified Workplace Analytics metric.
|
|
|
|
}
|
|
|
|
\details{
|
|
|
|
This function is called when the \code{mode} argument in \code{create_rank()} is
|
|
|
|
specified as \code{"combine"}.
|
|
|
|
}
|
|
|
|
\examples{
|
2021-07-05 18:14:30 +03:00
|
|
|
# Use a small sample for faster runtime
|
|
|
|
sq_data_small <- dplyr::slice_sample(sq_data, prop = 0.1)
|
|
|
|
|
2021-03-30 18:03:54 +03:00
|
|
|
create_rank_combine(
|
2021-07-05 18:14:30 +03:00
|
|
|
data = sq_data_small,
|
2021-03-30 18:03:54 +03:00
|
|
|
metric = "Email_hours"
|
|
|
|
)
|
|
|
|
|
2021-03-23 15:41:58 +03:00
|
|
|
}
|