docs: make consistent return options (#31)

This commit is contained in:
Martin Chan 2021-02-06 13:45:25 +00:00
Родитель 7b24ab3e7c
Коммит 4fb82573c3
4 изменённых файлов: 38 добавлений и 2 удалений

Просмотреть файл

@ -11,11 +11,17 @@
#' Additional options available to return a table with distribution elements.
#'
#' @inheritParams create_dist
#' @inherit create_dist return
#'
#' @family Workloads
#'
#' @examples
#' ## Return a plot
#' workloads_dist(sq_data, hrvar = "Organization", return = "plot")
#'
#' ## Return a summary table
#' workloads_dist(sq_data, hrvar = "Organization", return = "table")
#'
#' @export
workloads_dist <- function(data,

Просмотреть файл

@ -11,11 +11,17 @@
#' Additional options available to return a table with distribution elements.
#'
#' @inheritParams create_fizz
#' @inherit create_fizz return
#'
#' @family Workloads
#'
#' @examples
#' meeting_fizz(sq_data, hrvar = "Organization", return = "table")
#' # Return a plot
#' workloads_fizz(sq_data, hrvar = "Organization", return = "plot")
#'
#' # Return a table
#' workloads_fizz(sq_data, hrvar = "Organization", return = "table")
#'
#' @export
workloads_fizz <- function(data,

Просмотреть файл

@ -30,13 +30,25 @@ See \code{Value} for more information.}
\item{cut}{A numeric vector of length three to specify the breaks for the distribution,
e.g. c(10, 15, 20)}
}
\value{
A different output is returned depending on the value passed to the \code{return} argument:
\itemize{
\item \code{"plot"}: ggplot object. A stacked bar plot for the metric.
\item \code{"table"}: data frame. A summary table for the metric.
}
}
\description{
Analyze Work Week Span distribution.
Returns a stacked bar plot by default.
Additional options available to return a table with distribution elements.
}
\examples{
## Return a plot
workloads_dist(sq_data, hrvar = "Organization", return = "plot")
## Return a summary table
workloads_dist(sq_data, hrvar = "Organization", return = "table")
}
\seealso{
Other Workloads:

Просмотреть файл

@ -21,13 +21,25 @@ workloads_fizz(data, hrvar = "Organization", mingroup = 5, return = "plot")
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 jittered scatter plot for the metric.
\item \code{"table"}: data frame. A summary table for the metric.
}
}
\description{
Analyze Work Week Span distribution, and returns
a 'fizzy' scatter plot by default.
Additional options available to return a table with distribution elements.
}
\examples{
meeting_fizz(sq_data, hrvar = "Organization", return = "table")
# Return a plot
workloads_fizz(sq_data, hrvar = "Organization", return = "plot")
# Return a table
workloads_fizz(sq_data, hrvar = "Organization", return = "table")
}
\seealso{
Other Workloads: