wpa/man/workpatterns_hclust.Rd

100 строки
3.3 KiB
Plaintext
Исходник Обычный вид История

2020-10-27 00:21:24 +03:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/workpatterns_hclust.R
\name{workpatterns_hclust}
\alias{workpatterns_hclust}
\title{Create a hierarchical clustering of email or IMs by hour of day}
\usage{
workpatterns_hclust(
data,
k = 4,
return = "plot",
values = "percent",
signals = "email",
start_hour = "0900",
end_hour = "1700"
)
}
\arguments{
\item{data}{A data frame containing data from the Hourly Collaboration query.}
\item{k}{Numeric vector to specify the \code{k} number of clusters to cut by.}
2021-02-03 19:53:54 +03:00
\item{return}{Character vector to specify what to return. Valid options include:
\itemize{
\item "plot": returns a bar plot (default)
\item "data": returns raw data with the clusters
\item "table": returns a summary table
\item "plot-area": returns an overlapping area plot
\item "hclust": returns the hierarchical model generated by the function
\item "dist": returns the distance matrix used to build the clustering model
}}
2020-10-27 00:21:24 +03:00
\item{values}{Character vector to specify whether to return percentages
2021-02-03 19:53:54 +03:00
or absolute values in "data" and "plot". Valid values are:
\itemize{
\item "percent": percentage of signals divided by total signals (default)
\item "abs": absolute count of signals
}}
2020-10-27 00:21:24 +03:00
\item{signals}{Character vector to specify which collaboration metrics to use:
2021-02-02 17:59:32 +03:00
\itemize{
\item "email" (default) for emails only
2021-02-03 14:30:25 +03:00
\item "IM" for Teams messages only
2021-02-02 17:59:32 +03:00
\item "unscheduled_calls" for Unscheduled Calls only
\item "meetings" for Meetings only
\item or a combination of signals, such as \code{c("email", "IM")}
}}
2020-10-27 00:21:24 +03:00
\item{start_hour}{A character vector specifying starting hours,
e.g. "0900"}
\item{end_hour}{A character vector specifying starting hours,
e.g. "1700"}
}
\value{
The summary table returned by \code{return == "table"} represent percentiles of signals,
e.g. x\% of signals are sent by y hour of the day.
}
\description{
2021-02-03 14:30:25 +03:00
\ifelse{html}{\out{<a href='https://www.tidyverse.org/lifecycle/#experimental'><img src='figures/lifecycle-experimental.svg' alt='Experimental lifecycle'></a>}}{\strong{Experimental}}
2020-10-27 00:21:24 +03:00
Apply hierarchical clustering to emails sent by hour of day.
The hierarchical clustering uses cosine distance and the ward.D method
of agglomeration.
}
\details{
The hierarchical clustering is applied on the person-average volume-based (pav) level.
In other words, the clustering is applied on a dataset where the collaboration hours
are averaged by person and calculated as \% of total daily collaboration.
}
\examples{
2021-01-15 20:54:56 +03:00
## Run clusters, returning plot
workpatterns_hclust(em_data, k = 5, return = "plot")
## Run clusters, return raw data
workpatterns_hclust(em_data, k = 4, return = "data")
## Run clusters for instant messages only, return hclust object
workpatterns_hclust(em_data, k = 4, return = "hclust", signals = c("IM"))
2020-10-27 00:21:24 +03:00
\dontrun{
2021-01-15 20:54:56 +03:00
## Run clusters with all three signal types, return plot
workpatterns_hclust(em_data,
k = 4,
return = "plot",
signals = c("IM", "email", "unscheduled_calls"))
2020-10-27 00:21:24 +03:00
}
}
\seealso{
Other Work Patterns:
2021-01-27 19:16:08 +03:00
\code{\link{flex_index}()},
2020-10-27 00:21:24 +03:00
\code{\link{personas_hclust}()},
2021-01-27 19:16:08 +03:00
\code{\link{plot_flex_index}()},
\code{\link{workpatterns_area}()},
\code{\link{workpatterns_classify_bw}()},
\code{\link{workpatterns_classify_pav}()},
\code{\link{workpatterns_classify}()}
2020-10-27 00:21:24 +03:00
}
\concept{Work Patterns}