identify_shifts_wp {wpa} | R Documentation |
Identify shifts based on binary activity
Description
This function uses the Hourly Collaboration query and computes binary
activity to identify the 'behavioural' work shift. This is a distinct method
to 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.
Usage
identify_shifts_wp(
data,
signals = c("email", "IM"),
active_threshold = 1,
start_hour = 9,
end_hour = 17,
percent = FALSE,
n = 10,
return = "plot"
)
Arguments
data |
A data frame containing data from the Hourly Collaboration query. |
signals |
Character vector to specify which collaboration metrics to use:
|
active_threshold |
A numeric value specifying the minimum number of signals to be greater than in order to qualify as active. Defaults to 0. |
start_hour |
A character vector specifying starting hours, e.g.
|
end_hour |
A character vector specifying starting hours, e.g. |
percent |
Logical value to determine whether to show labels as
percentage signs. Defaults to |
n |
Numeric value specifying number of shifts to show. Defaults to 10.
This parameter is only used when |
return |
String specifying what to return. This must be one of the following strings:
See |
Value
A different output is returned depending on the value passed to the return
argument:
-
"plot"
: ggplot object. A bar plot for the weekly count of shifts. -
"table"
: data frame. A summary table for the count of shifts. -
"data
: data frame. Input data appended with the following columns:-
Start
-
End
-
DaySpan
-
Shifts
-
See Also
Other Data Validation:
check_query()
,
extract_hr()
,
flag_ch_ratio()
,
flag_em_ratio()
,
flag_extreme()
,
flag_outlooktime()
,
hr_trend()
,
hrvar_count()
,
hrvar_count_all()
,
hrvar_trend()
,
identify_churn()
,
identify_holidayweeks()
,
identify_inactiveweeks()
,
identify_nkw()
,
identify_outlier()
,
identify_privacythreshold()
,
identify_query()
,
identify_shifts()
,
identify_tenure()
,
remove_outliers()
,
standardise_pq()
,
subject_validate()
,
subject_validate_report()
,
track_HR_change()
,
validation_report()
Other Working Patterns:
flex_index()
,
identify_shifts()
,
plot_flex_index()
,
workpatterns_area()
,
workpatterns_classify()
,
workpatterns_classify_bw()
,
workpatterns_classify_pav()
,
workpatterns_hclust()
,
workpatterns_rank()
,
workpatterns_report()
Examples
# Return plot
em_data %>% identify_shifts_wp()
# Return plot - showing percentages
em_data %>% identify_shifts_wp(percent = TRUE)
# Return table
em_data %>% identify_shifts_wp(return = "table")