wpa/man/create_scatter.Rd

71 строка
1.9 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_scatter.R
\name{create_scatter}
\alias{create_scatter}
\title{Create a Scatter plot with two selected Workplace Analytics metrics (General Purpose)}
\usage{
create_scatter(
data,
metric_x,
metric_y,
hrvar = "Organization",
mingroup = 5,
return = "plot"
)
}
\arguments{
\item{data}{A Standard Person Query dataset in the form of a data frame.}
\item{metric_x}{Character string containing the name of the metric,
e.g. "Collaboration_hours"}
\item{metric_y}{Character string containing the name of the metric,
e.g. "Collaboration_hours"}
\item{hrvar}{HR Variable by which to split metrics, defaults to "Organization"
but accepts any character vector, e.g. "LevelDesignation"}
\item{mingroup}{Numeric value setting the privacy threshold / minimum group size. Defaults to 5.}
\item{return}{Character vector specifying what to return, defaults to "plot".
Valid inputs are "plot" and "table".}
}
\value{
Returns a ggplot object by default, where 'plot' is passed in \code{return}.
When 'table' is passed, a summary table is returned as a data frame.
}
\description{
Returns a scatter plot of two selected metrics, using colour to map
an HR attribute.
Returns a scatter plot by default, with additional options
to return a summary table.
}
\details{
This is a general purpose function that powers all the functions
in the package that produce scatter plots.
}
\examples{
create_scatter(sq_data,
"Internal_network_size",
"External_network_size",
"Organization")
create_scatter(sq_data,
"Generated_workload_call_hours",
"Generated_workload_email_hours",
"Organization", mingroup = 100, return = "plot")
}
\seealso{
Other General:
\code{\link{create_bar_asis}()},
\code{\link{create_bar}()},
\code{\link{create_boxplot}()},
\code{\link{create_bubble}()},
\code{\link{cut_hour}()},
\code{\link{extract_hr}()},
\code{\link{hrvar_count}()},
\code{\link{identify_outlier}()}
}
\concept{General}