From e42baba7d31180daac4583c7b1031f4e8be2a0f3 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Wed, 18 Nov 2020 15:43:32 +0000 Subject: [PATCH] docs: add alias and clean documentation Changes mainly to _dist and _sum functions --- NAMESPACE | 6 +++++- R/afterhours_dist.R | 2 +- R/collaboration_dist.R | 6 +----- R/email_dist.R | 2 +- R/email_summary.R | 4 +++- R/meeting_dist.R | 6 +----- R/meeting_summary.R | 3 +++ R/meetingtype_dist.R | 2 +- R/meetingtype_summary.R | 7 +++++++ R/one2one_dist.R | 2 +- R/one2one_sum.R | 4 +++- R/workloads_dist.R | 2 +- R/workloads_summary.R | 4 ++++ man/afterhours_dist.Rd | 2 +- man/collaboration_dist.Rd | 10 +--------- man/email_dist.Rd | 2 +- man/email_summary.Rd | 3 +++ man/identify_outlier.Rd | 11 +---------- man/meeting_dist.Rd | 11 +---------- man/meeting_fizz.Rd | 3 ++- man/meeting_line.Rd | 3 ++- man/meeting_rank.Rd | 3 ++- man/meeting_summary.Rd | 6 +++++- man/meetingtype_dist.Rd | 2 +- man/meetingtype_summary.Rd | 11 +++++++++++ man/one2one_dist.Rd | 2 +- man/one2one_sum.Rd | 3 +++ man/workloads_dist.Rd | 2 +- man/workloads_summary.Rd | 3 +++ 29 files changed, 71 insertions(+), 56 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index c77b1ec2..16d186fb 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -50,6 +50,7 @@ export(email_dist) export(email_fizz) export(email_line) export(email_rank) +export(email_sum) export(email_summary) export(email_trend) export(export) @@ -79,18 +80,19 @@ export(internal_network_plot) export(is_date_format) export(keymetrics_scan) export(meeting_dist) -export(meeting_distribution) export(meeting_fizz) export(meeting_line) export(meeting_quality) export(meeting_rank) export(meeting_skim) +export(meeting_sum) export(meeting_summary) export(meeting_tm_report) export(meeting_trend) export(meetingtype_dist) export(meetingtype_dist_ca) export(meetingtype_dist_mt) +export(meetingtype_sum) export(meetingtype_summary) export(mgrcoatt_dist) export(mgrrel_matrix) @@ -99,6 +101,7 @@ export(one2one_fizz) export(one2one_line) export(one2one_rank) export(one2one_sum) +export(one2one_summary) export(one2one_trend) export(period_change) export(personas_hclust) @@ -124,6 +127,7 @@ export(workloads_dist) export(workloads_fizz) export(workloads_line) export(workloads_rank) +export(workloads_sum) export(workloads_summary) export(workloads_trend) export(workpatterns_area) diff --git a/R/afterhours_dist.R b/R/afterhours_dist.R index d958a251..fd27c61e 100644 --- a/R/afterhours_dist.R +++ b/R/afterhours_dist.R @@ -3,7 +3,7 @@ # Licensed under the MIT License. See LICENSE.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -#' @title After-Hours distribution +#' @title Distribution of After-hours Collaboration Hours as a 100% stacked bar #' @name afterhours_dist #' #' @description Analyse the distribution of weekly after-hours collaboration time. diff --git a/R/collaboration_dist.R b/R/collaboration_dist.R index cfd1c135..db533f94 100644 --- a/R/collaboration_dist.R +++ b/R/collaboration_dist.R @@ -3,7 +3,7 @@ # Licensed under the MIT License. See LICENSE.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -#' @title Collaboration Hours distribution +#' @title Distribution of Collaboration Hours as a 100% stacked bar #' #' @description #' Analyze the distribution of Collaboration Hours. @@ -39,7 +39,3 @@ collaboration_dist <- function(data, } - -#' @rdname collaboration_dist -#' @export -collaboration_distribution <- collaboration_dist diff --git a/R/email_dist.R b/R/email_dist.R index 566165ac..784b190a 100644 --- a/R/email_dist.R +++ b/R/email_dist.R @@ -3,7 +3,7 @@ # Licensed under the MIT License. See LICENSE.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -#' @title Email Hours distribution +#' @title Distribution of Email Hours as a 100% stacked bar #' #' @description #' Analyze Email Hours distribution. diff --git a/R/email_summary.R b/R/email_summary.R index d7bc89b7..98af3aac 100644 --- a/R/email_summary.R +++ b/R/email_summary.R @@ -41,7 +41,9 @@ email_summary <- function(data, } - +#' @rdname email_summary +#' @export +email_sum <- email_summary diff --git a/R/meeting_dist.R b/R/meeting_dist.R index 7c70f36f..7da24468 100644 --- a/R/meeting_dist.R +++ b/R/meeting_dist.R @@ -3,7 +3,7 @@ # Licensed under the MIT License. See LICENSE.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -#' @title Meeting Hours distribution +#' @title Distribution of Meeting Hours as a 100% stacked bar #' #' @description #' Analyze Meeting Hours distribution. @@ -40,7 +40,3 @@ meeting_dist <- function(data, return = return, cut = cut) } - -#' @rdname meeting_dist -#' @export -meeting_distribution <- meeting_dist diff --git a/R/meeting_summary.R b/R/meeting_summary.R index ea48680f..1cfed1a7 100644 --- a/R/meeting_summary.R +++ b/R/meeting_summary.R @@ -38,6 +38,9 @@ meeting_summary <- function(data, bar_colour = "default") } +#' @rdname meeting_summary +#' @export +meeting_sum <- meeting_summary diff --git a/R/meetingtype_dist.R b/R/meetingtype_dist.R index b1cf1b11..ca460b3c 100644 --- a/R/meetingtype_dist.R +++ b/R/meetingtype_dist.R @@ -1,4 +1,4 @@ -#' @title Meeting Type Distribution +#' @title Distribution of Meeting Types by number of Attendees and Duration #' #' @description #' Calculate the hour distribution of internal meeting types. diff --git a/R/meetingtype_summary.R b/R/meetingtype_summary.R index 2bc60b45..d283ac95 100644 --- a/R/meetingtype_summary.R +++ b/R/meetingtype_summary.R @@ -21,6 +21,8 @@ #' @import ggplot2 #' @import dplyr #' +#' @family Meetings +#' #' @export meetingtype_summary <- function(data, hrvar = "Organization", @@ -67,3 +69,8 @@ meetingtype_summary <- function(data, stop("Please enter a valid input for `return`.") } } + +#' @rdname meetingtype_summary +#' @export +meetingtype_sum <- meetingtype_summary + diff --git a/R/one2one_dist.R b/R/one2one_dist.R index 2042022c..4562b422 100644 --- a/R/one2one_dist.R +++ b/R/one2one_dist.R @@ -3,7 +3,7 @@ # Licensed under the MIT License. See LICENSE.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -#' @title Manager 1:1 Time Trend distribution +#' @title Distribution of Manager 1:1 Time as a 100% stacked bar #' #' @description #' Analyze Manager 1:1 Time distribution. diff --git a/R/one2one_sum.R b/R/one2one_sum.R index 69986da9..eb433216 100644 --- a/R/one2one_sum.R +++ b/R/one2one_sum.R @@ -39,7 +39,9 @@ one2one_sum <- function(data, } - +#' @rdname one2one_sum +#' @export +one2one_summary <- one2one_sum diff --git a/R/workloads_dist.R b/R/workloads_dist.R index 6988fd38..70fd2557 100644 --- a/R/workloads_dist.R +++ b/R/workloads_dist.R @@ -3,7 +3,7 @@ # Licensed under the MIT License. See LICENSE.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -#' @title Distribution of Work Week Span +#' @title Distribution of Work Week Span as a 100% stacked bar #' #' @description #' Analyze Work Week Span distribution. diff --git a/R/workloads_summary.R b/R/workloads_summary.R index e3404984..33eb3723 100644 --- a/R/workloads_summary.R +++ b/R/workloads_summary.R @@ -38,3 +38,7 @@ workloads_summary <- function(data, bar_colour = "darkblue") } + +#' @rdname workloads_summary +#' @export +workloads_sum <- workloads_summary diff --git a/man/afterhours_dist.Rd b/man/afterhours_dist.Rd index bdccb7c5..8a5a7ec5 100644 --- a/man/afterhours_dist.Rd +++ b/man/afterhours_dist.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/afterhours_dist.R \name{afterhours_dist} \alias{afterhours_dist} -\title{After-Hours distribution} +\title{Distribution of After-hours Collaboration Hours as a 100\% stacked bar} \usage{ afterhours_dist( data, diff --git a/man/collaboration_dist.Rd b/man/collaboration_dist.Rd index bc71968f..ac1bd9e8 100644 --- a/man/collaboration_dist.Rd +++ b/man/collaboration_dist.Rd @@ -3,7 +3,7 @@ \name{collaboration_dist} \alias{collaboration_dist} \alias{collaboration_distribution} -\title{Collaboration Hours distribution} +\title{Distribution of Collaboration Hours as a 100\% stacked bar} \usage{ collaboration_dist( data, @@ -13,14 +13,6 @@ collaboration_dist( cut = c(15, 20, 25) ) -collaboration_distribution( - data, - hrvar = "Organization", - mingroup = 5, - return = "plot", - cut = c(15, 20, 25) -) - collaboration_distribution( data, hrvar = "Organization", diff --git a/man/email_dist.Rd b/man/email_dist.Rd index 0ff9069b..24c1a5dc 100644 --- a/man/email_dist.Rd +++ b/man/email_dist.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/email_dist.R \name{email_dist} \alias{email_dist} -\title{Email Hours distribution} +\title{Distribution of Email Hours as a 100\% stacked bar} \usage{ email_dist( data, diff --git a/man/email_summary.Rd b/man/email_summary.Rd index 9c618ce7..fe67de93 100644 --- a/man/email_summary.Rd +++ b/man/email_summary.Rd @@ -2,9 +2,12 @@ % Please edit documentation in R/email_summary.R \name{email_summary} \alias{email_summary} +\alias{email_sum} \title{Email Summary} \usage{ email_summary(data, hrvar = "Organization", mingroup = 5, return = "plot") + +email_sum(data, hrvar = "Organization", mingroup = 5, return = "plot") } \arguments{ \item{data}{A Standard Person Query dataset in the form of a data frame.} diff --git a/man/identify_outlier.Rd b/man/identify_outlier.Rd index 4832d812..25f31e3d 100644 --- a/man/identify_outlier.Rd +++ b/man/identify_outlier.Rd @@ -2,14 +2,7 @@ % Please edit documentation in R/identify_outlier.R \name{identify_outlier} \alias{identify_outlier} -\title{Identify outliers across time - -This function takes in a selected metric and uses -z-score (number of standard deviations) to identify outliers -across time. There are applications in this for identifying -weeks with abnormally low collaboration activity, e.g. holidays. -Time as a grouping variable can be overridden with the \code{group_var} -argument.} +\title{Identify metric outliers over a date interval} \usage{ identify_outlier(data, group_var = "Date", metric = "Collaboration_hours") } @@ -27,8 +20,6 @@ Returns a data frame with \code{Date} (if grouping variable is not set), the metric, and the corresponding z-score. } \description{ -Identify outliers across time - This function takes in a selected metric and uses z-score (number of standard deviations) to identify outliers across time. There are applications in this for identifying diff --git a/man/meeting_dist.Rd b/man/meeting_dist.Rd index f65b1e19..d3778c42 100644 --- a/man/meeting_dist.Rd +++ b/man/meeting_dist.Rd @@ -2,8 +2,7 @@ % Please edit documentation in R/meeting_dist.R \name{meeting_dist} \alias{meeting_dist} -\alias{meeting_distribution} -\title{Meeting Hours distribution} +\title{Distribution of Meeting Hours as a 100\% stacked bar} \usage{ meeting_dist( data, @@ -12,14 +11,6 @@ meeting_dist( return = "plot", cut = c(5, 10, 15) ) - -meeting_distribution( - data, - hrvar = "Organization", - mingroup = 5, - return = "plot", - cut = c(5, 10, 15) -) } \arguments{ \item{data}{A Standard Person Query dataset in the form of a data frame.} diff --git a/man/meeting_fizz.Rd b/man/meeting_fizz.Rd index 3f9c9a84..37c6b2a4 100644 --- a/man/meeting_fizz.Rd +++ b/man/meeting_fizz.Rd @@ -28,6 +28,7 @@ meeting_fizz(sq_data, hrvar = "Organization", return = "table") Other Meetings: \code{\link{meeting_line}()}, \code{\link{meeting_rank}()}, -\code{\link{meeting_summary}()} +\code{\link{meeting_summary}()}, +\code{\link{meetingtype_summary}()} } \concept{Meetings} diff --git a/man/meeting_line.Rd b/man/meeting_line.Rd index 20c1740f..9dbe05e8 100644 --- a/man/meeting_line.Rd +++ b/man/meeting_line.Rd @@ -41,6 +41,7 @@ meeting_line(sq_data, hrvar = "LevelDesignation", return = "table") Other Meetings: \code{\link{meeting_fizz}()}, \code{\link{meeting_rank}()}, -\code{\link{meeting_summary}()} +\code{\link{meeting_summary}()}, +\code{\link{meetingtype_summary}()} } \concept{Meetings} diff --git a/man/meeting_rank.Rd b/man/meeting_rank.Rd index 584fd3d1..91cdfbca 100644 --- a/man/meeting_rank.Rd +++ b/man/meeting_rank.Rd @@ -34,6 +34,7 @@ See \code{create_rank()} for applying the same analysis to a different metric. Other Meetings: \code{\link{meeting_fizz}()}, \code{\link{meeting_line}()}, -\code{\link{meeting_summary}()} +\code{\link{meeting_summary}()}, +\code{\link{meetingtype_summary}()} } \concept{Meetings} diff --git a/man/meeting_summary.Rd b/man/meeting_summary.Rd index d61223be..845acfac 100644 --- a/man/meeting_summary.Rd +++ b/man/meeting_summary.Rd @@ -2,9 +2,12 @@ % Please edit documentation in R/meeting_summary.R \name{meeting_summary} \alias{meeting_summary} +\alias{meeting_sum} \title{Meeting Summary} \usage{ meeting_summary(data, hrvar = "Organization", mingroup = 5, return = "plot") + +meeting_sum(data, hrvar = "Organization", mingroup = 5, return = "plot") } \arguments{ \item{data}{A Standard Person Query dataset in the form of a data frame.} @@ -37,6 +40,7 @@ meeting_summary(sq_data, hrvar = "LevelDesignation", return = "table") Other Meetings: \code{\link{meeting_fizz}()}, \code{\link{meeting_line}()}, -\code{\link{meeting_rank}()} +\code{\link{meeting_rank}()}, +\code{\link{meetingtype_summary}()} } \concept{Meetings} diff --git a/man/meetingtype_dist.Rd b/man/meetingtype_dist.Rd index 37779522..bde8b6c0 100644 --- a/man/meetingtype_dist.Rd +++ b/man/meetingtype_dist.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/meetingtype_dist.R \name{meetingtype_dist} \alias{meetingtype_dist} -\title{Meeting Type Distribution} +\title{Distribution of Meeting Types by number of Attendees and Duration} \usage{ meetingtype_dist(data, hrvar = NULL, mingroup = 5, return = "plot") } diff --git a/man/meetingtype_summary.Rd b/man/meetingtype_summary.Rd index 13edb25a..b5f72d30 100644 --- a/man/meetingtype_summary.Rd +++ b/man/meetingtype_summary.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/meetingtype_summary.R \name{meetingtype_summary} \alias{meetingtype_summary} +\alias{meetingtype_sum} \title{Create a summary bar chart of the proportion of Meeting Hours spent in Long or Large Meetings} \usage{ meetingtype_summary( @@ -10,6 +11,8 @@ meetingtype_summary( mingroup = 5, return = "plot" ) + +meetingtype_sum(data, hrvar = "Organization", mingroup = 5, return = "plot") } \arguments{ \item{data}{Collaboration Assessment query in the form of a data frame. Requires the following variables: @@ -35,3 +38,11 @@ Valid inputs are "plot" and "table".} This function creates a bar chart showing the percentage of meeting hours which are spent in long or large meetings. } +\seealso{ +Other Meetings: +\code{\link{meeting_fizz}()}, +\code{\link{meeting_line}()}, +\code{\link{meeting_rank}()}, +\code{\link{meeting_summary}()} +} +\concept{Meetings} diff --git a/man/one2one_dist.Rd b/man/one2one_dist.Rd index c1266add..2abec8dc 100644 --- a/man/one2one_dist.Rd +++ b/man/one2one_dist.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/one2one_dist.R \name{one2one_dist} \alias{one2one_dist} -\title{Manager 1:1 Time Trend distribution} +\title{Distribution of Manager 1:1 Time as a 100\% stacked bar} \usage{ one2one_dist( data, diff --git a/man/one2one_sum.Rd b/man/one2one_sum.Rd index 017f4652..ce1d3181 100644 --- a/man/one2one_sum.Rd +++ b/man/one2one_sum.Rd @@ -2,9 +2,12 @@ % Please edit documentation in R/one2one_sum.R \name{one2one_sum} \alias{one2one_sum} +\alias{one2one_summary} \title{Manager 1:1 Time Summary} \usage{ one2one_sum(data, hrvar = "Organization", mingroup = 5, return = "plot") + +one2one_summary(data, hrvar = "Organization", mingroup = 5, return = "plot") } \arguments{ \item{data}{A Standard Person Query dataset in the form of a data frame.} diff --git a/man/workloads_dist.Rd b/man/workloads_dist.Rd index 476edea8..e109a336 100644 --- a/man/workloads_dist.Rd +++ b/man/workloads_dist.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/workloads_dist.R \name{workloads_dist} \alias{workloads_dist} -\title{Distribution of Work Week Span} +\title{Distribution of Work Week Span as a 100\% stacked bar} \usage{ workloads_dist( data, diff --git a/man/workloads_summary.Rd b/man/workloads_summary.Rd index 1be8427c..4677bdd7 100644 --- a/man/workloads_summary.Rd +++ b/man/workloads_summary.Rd @@ -2,9 +2,12 @@ % Please edit documentation in R/workloads_summary.R \name{workloads_summary} \alias{workloads_summary} +\alias{workloads_sum} \title{Work Week Span Summary} \usage{ workloads_summary(data, hrvar = "Organization", mingroup = 5, return = "plot") + +workloads_sum(data, hrvar = "Organization", mingroup = 5, return = "plot") } \arguments{ \item{data}{A Standard Person Query dataset in the form of a data frame.}