2020-10-27 00:21:24 +03:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
% Please edit documentation in R/mgrrel_matrix.R
|
|
|
|
\name{mgrrel_matrix}
|
|
|
|
\alias{mgrrel_matrix}
|
|
|
|
\title{Manager Relationship 2x2 Matrix}
|
|
|
|
\usage{
|
|
|
|
mgrrel_matrix(
|
|
|
|
data,
|
|
|
|
hrvar = NULL,
|
2021-03-05 17:15:31 +03:00
|
|
|
mingroup = 5,
|
2020-10-27 00:21:24 +03:00
|
|
|
return = "plot",
|
2020-11-18 17:54:03 +03:00
|
|
|
plot_colors = c("#fe7f4f", "#b4d5dd", "#facebc", "#fcf0eb"),
|
2020-10-27 00:21:24 +03:00
|
|
|
threshold = 15
|
|
|
|
)
|
|
|
|
}
|
|
|
|
\arguments{
|
2020-12-12 16:43:59 +03:00
|
|
|
\item{data}{Standard Person Query data to pass through. Accepts a data frame.}
|
2020-10-27 00:21:24 +03:00
|
|
|
|
2021-03-05 15:47:58 +03:00
|
|
|
\item{hrvar}{HR Variable by which to split metrics. Accepts a character
|
|
|
|
vector, e.g. "Organization". Defaults to \code{NULL}.}
|
|
|
|
|
|
|
|
\item{mingroup}{Numeric value setting the privacy threshold / minimum group
|
|
|
|
size. Defaults to 5.}
|
2020-10-27 00:21:24 +03:00
|
|
|
|
2021-02-23 18:30:10 +03:00
|
|
|
\item{return}{String specifying what to return. This must be one of the
|
|
|
|
following strings:
|
|
|
|
\itemize{
|
|
|
|
\item \code{"plot"}
|
|
|
|
\item \code{"table"}
|
|
|
|
\item \code{"data"}
|
|
|
|
}
|
|
|
|
|
|
|
|
See \code{Value} for more information.}
|
2020-10-27 00:21:24 +03:00
|
|
|
|
2021-03-05 15:47:58 +03:00
|
|
|
\item{plot_colors}{Pass a character vector of length 4 containing HEX codes
|
|
|
|
to specify colors to use in plotting.}
|
2020-10-27 00:21:24 +03:00
|
|
|
|
|
|
|
\item{threshold}{Specify a numeric value to determine threshold (in minutes) for 1:1 manager hours.
|
|
|
|
Defaults to 15.}
|
|
|
|
}
|
2021-02-23 18:30:10 +03:00
|
|
|
\value{
|
|
|
|
A different output is returned depending on the value passed to the \code{return}
|
|
|
|
argument:
|
|
|
|
\itemize{
|
|
|
|
\item \code{"plot"}: ggplot object. When \code{NULL} is passed to \code{hrvar}, a two-by-two
|
|
|
|
grid where the size of the grid represents total percentage of employees is
|
|
|
|
returned. Otherwise, a horizontal stacked bar plot is returned.
|
|
|
|
\item \code{"table"}: data frame. A summary table is returned.
|
|
|
|
\item \code{"data"}: data frame. A long table grouped at the \code{PersonId} level with
|
|
|
|
the following columns:
|
|
|
|
\itemize{
|
|
|
|
\item \code{PersonId}
|
|
|
|
\item HR variable supplied to \code{hrvar}
|
|
|
|
\item \code{CoattendanceRate}
|
|
|
|
\item \code{Meeting_hours_with_manager_1_on_1}
|
|
|
|
\item \code{mgr1on1}
|
|
|
|
\item \code{Type}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-27 00:21:24 +03:00
|
|
|
\description{
|
|
|
|
Generate the Manager-Relationship 2x2 matrix, returning a ggplot object by default.
|
|
|
|
Additional options available to return a "wide" or "long" summary table.
|
|
|
|
}
|
|
|
|
\examples{
|
2021-02-23 18:30:10 +03:00
|
|
|
# Return matrix
|
2020-10-27 00:21:24 +03:00
|
|
|
mgrrel_matrix(sq_data)
|
|
|
|
|
2021-02-23 18:30:10 +03:00
|
|
|
# Return stacked bar plot
|
|
|
|
mgrrel_matrix(sq_data, hrvar = "Organization")
|
|
|
|
|
|
|
|
## Visualize coaching style types
|
|
|
|
# Ensure dplyr is loaded
|
|
|
|
library(dplyr)
|
|
|
|
|
|
|
|
# Extract PersonId and Coaching Type
|
|
|
|
match_df <-
|
|
|
|
sq_data \%>\%
|
|
|
|
mgrrel_matrix(return = "data") \%>\%
|
|
|
|
select(PersonId, Type)
|
|
|
|
|
|
|
|
# Join and visualize baseline
|
|
|
|
sq_data \%>\%
|
|
|
|
left_join(match_df, by = "PersonId") \%>\%
|
|
|
|
keymetrics_scan(hrvar = "Type",
|
|
|
|
return = "plot")
|
|
|
|
|
2020-10-27 00:21:24 +03:00
|
|
|
}
|
|
|
|
\seealso{
|
2021-03-05 15:47:58 +03:00
|
|
|
Other Visualization:
|
|
|
|
\code{\link{afterhours_dist}()},
|
|
|
|
\code{\link{afterhours_fizz}()},
|
|
|
|
\code{\link{afterhours_line}()},
|
|
|
|
\code{\link{afterhours_rank}()},
|
|
|
|
\code{\link{afterhours_summary}()},
|
|
|
|
\code{\link{afterhours_trend}()},
|
|
|
|
\code{\link{collaboration_area}()},
|
|
|
|
\code{\link{collaboration_dist}()},
|
|
|
|
\code{\link{collaboration_fizz}()},
|
|
|
|
\code{\link{collaboration_line}()},
|
|
|
|
\code{\link{collaboration_rank}()},
|
|
|
|
\code{\link{collaboration_sum}()},
|
|
|
|
\code{\link{collaboration_trend}()},
|
|
|
|
\code{\link{create_bar_asis}()},
|
|
|
|
\code{\link{create_bar}()},
|
|
|
|
\code{\link{create_boxplot}()},
|
|
|
|
\code{\link{create_bubble}()},
|
|
|
|
\code{\link{create_dist}()},
|
|
|
|
\code{\link{create_fizz}()},
|
|
|
|
\code{\link{create_line_asis}()},
|
|
|
|
\code{\link{create_line}()},
|
|
|
|
\code{\link{create_period_scatter}()},
|
|
|
|
\code{\link{create_rank}()},
|
|
|
|
\code{\link{create_sankey}()},
|
|
|
|
\code{\link{create_scatter}()},
|
|
|
|
\code{\link{create_stacked}()},
|
|
|
|
\code{\link{create_trend}()},
|
|
|
|
\code{\link{email_dist}()},
|
|
|
|
\code{\link{email_fizz}()},
|
|
|
|
\code{\link{email_line}()},
|
|
|
|
\code{\link{email_rank}()},
|
|
|
|
\code{\link{email_summary}()},
|
|
|
|
\code{\link{email_trend}()},
|
|
|
|
\code{\link{external_network_plot}()},
|
|
|
|
\code{\link{hr_trend}()},
|
|
|
|
\code{\link{hrvar_count}()},
|
|
|
|
\code{\link{internal_network_plot}()},
|
|
|
|
\code{\link{keymetrics_scan}()},
|
|
|
|
\code{\link{meeting_dist}()},
|
|
|
|
\code{\link{meeting_fizz}()},
|
|
|
|
\code{\link{meeting_line}()},
|
|
|
|
\code{\link{meeting_quality}()},
|
|
|
|
\code{\link{meeting_rank}()},
|
|
|
|
\code{\link{meeting_summary}()},
|
|
|
|
\code{\link{meeting_trend}()},
|
|
|
|
\code{\link{meetingtype_dist_ca}()},
|
|
|
|
\code{\link{meetingtype_dist_mt}()},
|
|
|
|
\code{\link{meetingtype_dist}()},
|
|
|
|
\code{\link{meetingtype_summary}()},
|
2021-03-05 17:05:00 +03:00
|
|
|
\code{\link{mgrcoatt_dist}()},
|
|
|
|
\code{\link{one2one_dist}()},
|
|
|
|
\code{\link{one2one_fizz}()},
|
2021-03-10 00:24:29 +03:00
|
|
|
\code{\link{one2one_freq}()},
|
2021-03-05 17:05:00 +03:00
|
|
|
\code{\link{one2one_line}()},
|
|
|
|
\code{\link{one2one_rank}()},
|
|
|
|
\code{\link{one2one_sum}()},
|
|
|
|
\code{\link{one2one_trend}()},
|
|
|
|
\code{\link{period_change}()},
|
|
|
|
\code{\link{workloads_dist}()},
|
|
|
|
\code{\link{workloads_fizz}()},
|
|
|
|
\code{\link{workloads_line}()},
|
|
|
|
\code{\link{workloads_rank}()},
|
|
|
|
\code{\link{workloads_summary}()},
|
|
|
|
\code{\link{workloads_trend}()},
|
|
|
|
\code{\link{workpatterns_area}()},
|
|
|
|
\code{\link{workpatterns_rank}()}
|
2021-03-05 15:47:58 +03:00
|
|
|
|
2020-10-27 00:21:24 +03:00
|
|
|
Other Managerial Relations:
|
|
|
|
\code{\link{mgrcoatt_dist}()},
|
|
|
|
\code{\link{one2one_dist}()},
|
2020-10-29 19:45:44 +03:00
|
|
|
\code{\link{one2one_fizz}()},
|
2021-03-02 18:22:27 +03:00
|
|
|
\code{\link{one2one_freq}()},
|
2020-10-27 00:21:24 +03:00
|
|
|
\code{\link{one2one_line}()},
|
|
|
|
\code{\link{one2one_rank}()},
|
|
|
|
\code{\link{one2one_sum}()},
|
|
|
|
\code{\link{one2one_trend}()}
|
|
|
|
}
|
|
|
|
\concept{Managerial Relations}
|
2021-03-05 15:47:58 +03:00
|
|
|
\concept{Visualization}
|