2021-02-15 21:02:17 +03:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
% Please edit documentation in R/identify_shifts_wp.R
|
|
|
|
\name{identify_shifts_wp}
|
|
|
|
\alias{identify_shifts_wp}
|
|
|
|
\title{Identify shifts based on binary activity}
|
|
|
|
\usage{
|
|
|
|
identify_shifts_wp(
|
|
|
|
data,
|
|
|
|
signals = c("email", "IM"),
|
|
|
|
active_threshold = 1,
|
|
|
|
start_hour = 9,
|
|
|
|
end_hour = 17,
|
2021-06-17 19:58:15 +03:00
|
|
|
percent = FALSE,
|
2021-06-30 16:29:42 +03:00
|
|
|
n = 10,
|
2021-02-15 21:02:17 +03:00
|
|
|
return = "plot"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
\arguments{
|
|
|
|
\item{data}{A data frame containing data from the Hourly Collaboration query.}
|
|
|
|
|
2021-03-02 03:13:38 +03:00
|
|
|
\item{signals}{Character vector to specify which collaboration metrics to
|
|
|
|
use:
|
|
|
|
\itemize{
|
|
|
|
\item a combination of signals, such as \code{c("email", "IM")} (default)
|
|
|
|
\item \code{"email"} for emails only
|
|
|
|
\item \code{"IM"} for Teams messages only
|
|
|
|
\item \code{"unscheduled_calls"} for Unscheduled Calls only
|
|
|
|
\item \code{"meetings"} for Meetings only
|
|
|
|
}}
|
|
|
|
|
|
|
|
\item{active_threshold}{A numeric value specifying the minimum number of
|
|
|
|
signals to be greater than in order to qualify as \emph{active}. Defaults to 0.}
|
|
|
|
|
2021-06-17 16:31:00 +03:00
|
|
|
\item{start_hour}{A character vector specifying starting hours, e.g.
|
|
|
|
\code{"0900"}. Note that this currently only supports \strong{hourly} increments. If
|
|
|
|
the official hours specifying checking in and 9 AM and checking out at 5
|
|
|
|
PM, then \code{"0900"} should be supplied here.}
|
2021-03-02 03:13:38 +03:00
|
|
|
|
2021-06-17 16:31:00 +03:00
|
|
|
\item{end_hour}{A character vector specifying starting hours, e.g. \code{"1700"}.
|
|
|
|
Note that this currently only supports \strong{hourly} increments. If the
|
|
|
|
official hours specifying checking in and 9 AM and checking out at 5 PM,
|
|
|
|
then \code{"1700"} should be supplied here.}
|
2021-03-02 03:13:38 +03:00
|
|
|
|
2021-06-17 19:58:15 +03:00
|
|
|
\item{percent}{Logical value to determine whether to show labels as
|
|
|
|
percentage signs. Defaults to \code{FALSE}.}
|
|
|
|
|
2021-06-30 16:29:42 +03:00
|
|
|
\item{n}{Numeric value specifying number of shifts to show. Defaults to 10.
|
|
|
|
This parameter is only used when \code{return} is set to \code{"plot"},}
|
|
|
|
|
2021-02-15 21:02:17 +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.}
|
|
|
|
}
|
|
|
|
\value{
|
|
|
|
A different output is returned depending on the value passed to the \code{return}
|
|
|
|
argument:
|
|
|
|
\itemize{
|
|
|
|
\item \code{"plot"}: ggplot object. A bar plot for the weekly count of shifts.
|
|
|
|
\item \code{"table"}: data frame. A summary table for the count of shifts.
|
|
|
|
\item \verb{"data}: data frame. Input data appended with the following columns:
|
|
|
|
\itemize{
|
|
|
|
\item \code{Start}
|
|
|
|
\item \code{End}
|
|
|
|
\item \code{DaySpan}
|
|
|
|
\item \code{Shifts}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
\description{
|
|
|
|
This function uses the Hourly Collaboration query and computes binary
|
|
|
|
activity to identify the 'behavioural' work shift. This is a distinct method
|
|
|
|
to \code{identify_shifts()}, which instead uses outlook calendar settings for
|
|
|
|
start and end time of work day to identify work shifts. The two methods can
|
|
|
|
be compared to gauge the accuracy of existing Outlook settings.
|
|
|
|
}
|
|
|
|
\examples{
|
|
|
|
# Return plot
|
|
|
|
em_data \%>\% identify_shifts_wp()
|
|
|
|
|
2021-06-30 16:29:42 +03:00
|
|
|
# Return plot - showing percentages
|
|
|
|
em_data \%>\% identify_shifts_wp(percent = TRUE)
|
|
|
|
|
2021-02-15 21:02:17 +03:00
|
|
|
# Return table
|
|
|
|
em_data \%>\% identify_shifts_wp(return = "table")
|
|
|
|
|
|
|
|
}
|
2021-02-15 21:03:41 +03:00
|
|
|
\seealso{
|
2021-03-05 14:18:35 +03:00
|
|
|
Other Data Validation:
|
|
|
|
\code{\link{check_query}()},
|
|
|
|
\code{\link{extract_hr}()},
|
|
|
|
\code{\link{flag_ch_ratio}()},
|
|
|
|
\code{\link{flag_em_ratio}()},
|
|
|
|
\code{\link{flag_extreme}()},
|
|
|
|
\code{\link{flag_outlooktime}()},
|
|
|
|
\code{\link{hr_trend}()},
|
|
|
|
\code{\link{hrvar_count_all}()},
|
|
|
|
\code{\link{hrvar_count}()},
|
2021-05-05 12:08:10 +03:00
|
|
|
\code{\link{hrvar_trend}()},
|
2021-03-05 14:18:35 +03:00
|
|
|
\code{\link{identify_churn}()},
|
|
|
|
\code{\link{identify_holidayweeks}()},
|
|
|
|
\code{\link{identify_inactiveweeks}()},
|
|
|
|
\code{\link{identify_nkw}()},
|
|
|
|
\code{\link{identify_outlier}()},
|
|
|
|
\code{\link{identify_privacythreshold}()},
|
|
|
|
\code{\link{identify_query}()},
|
|
|
|
\code{\link{identify_shifts}()},
|
|
|
|
\code{\link{identify_tenure}()},
|
|
|
|
\code{\link{remove_outliers}()},
|
2021-03-05 17:05:00 +03:00
|
|
|
\code{\link{standardise_pq}()},
|
2021-03-05 14:18:35 +03:00
|
|
|
\code{\link{subject_validate_report}()},
|
|
|
|
\code{\link{subject_validate}()},
|
2021-03-05 17:05:00 +03:00
|
|
|
\code{\link{track_HR_change}()},
|
|
|
|
\code{\link{validation_report}()}
|
2021-03-05 14:18:35 +03:00
|
|
|
|
2021-03-05 01:19:07 +03:00
|
|
|
Other Working Patterns:
|
2021-02-15 21:03:41 +03:00
|
|
|
\code{\link{flex_index}()},
|
2021-03-05 14:18:35 +03:00
|
|
|
\code{\link{identify_shifts}()},
|
2021-02-15 21:03:41 +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}()},
|
2021-03-05 17:05:00 +03:00
|
|
|
\code{\link{workpatterns_hclust}()},
|
|
|
|
\code{\link{workpatterns_rank}()},
|
|
|
|
\code{\link{workpatterns_report}()}
|
2021-02-15 21:03:41 +03:00
|
|
|
}
|
2021-03-05 14:18:35 +03:00
|
|
|
\concept{Data Validation}
|
2021-03-05 01:19:07 +03:00
|
|
|
\concept{Working Patterns}
|