refactor: Move long-running examples under donttest

examples in question were taking too long to run during package checks, causing warnings to be generated. By moving them under `donttest`, they will be excluded from the package checks while still being included in the package documentation.
This commit is contained in:
Martin Chan 2023-08-17 09:49:20 +01:00
Родитель 6272b5311c
Коммит d53931584f
16 изменённых файлов: 42 добавлений и 6 удалений

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

@ -45,7 +45,9 @@
#' collaboration_area(sq_data, hrvar = "Organization")
#'
#' # Return summary table
#' \donttest{
#' collaboration_area(sq_data, return = "table")
#' }
#'
#' @return
#' A different output is returned depending on the value passed to the `return` argument:

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

@ -17,7 +17,7 @@
#'
#' @examples
#' # Return plot
#' sq_data %>% external_network_plot(return = "plot")
#' external_network_plot(sq_data, return = "plot")
#'
#' @return
#' 'ggplot' object showing a bubble plot with external network size as the

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

@ -131,12 +131,16 @@
#' flex_index(return = "plot", plot_method = "common")
#'
#' # Plot Flexibility Index over time
#' \donttest{
#' em_data %>%
#' flex_index(return = "plot", plot_method = "time")
#' }
#'
#' # Return a summary table with the computed Flexibility Index
#' \donttest{
#' em_data %>%
#' flex_index(hrvar = "Organization", return = "table")
#' }
#'
#' @section Returning the raw data:
#' The raw data containing the computed Flexibility Index can be returned with

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

@ -18,10 +18,10 @@
#'
#' @examples
#' # Return plot
#' sq_data %>% internal_network_plot(return = "plot")
#' internal_network_plot(sq_data, return = "plot")
#'
#' # Return summary table
#' sq_data %>% internal_network_plot(return = "table")
#' internal_network_plot(sq_data, return = "table")
#'
#' @family Visualization
#' @family Network

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

@ -40,7 +40,9 @@
#' keymetrics_scan(sq_data, low = "purple", high = "yellow")
#'
#' # Return summary table
#' \donttest{
#' keymetrics_scan(sq_data, hrvar = "LevelDesignation", return = "table")
#' }
#'
#' @export

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

@ -33,12 +33,16 @@
#' meeting_quality(sq_data, return = "plot")
#'
#' # Return plot - showing multi-tasking %
#' \donttest{
#' meeting_quality(sq_data,
#' metric_x = "Multitasking_meeting_hours",
#' return = "plot")
#' }
#'
#' # Return summary table
#' \donttest{
#' meeting_quality(sq_data, return = "table")
#' }
#'
#' @export

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

@ -55,10 +55,12 @@
#' k = 4)
#'
#' # Return summary table
#' \donttest{
#' personas_hclust(sq_data,
#' metrics = c("Collaboration_hours", "Workweek_span"),
#' k = 4,
#' return = "table")
#' }
#'
#' \donttest{
#' # Return data with clusters appended

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

@ -68,10 +68,14 @@
#' workpatterns_area(em_data, return = "plot", values = "percent")
#'
#' # Return visualization of absolute values
#' \dontest{
#' workpatterns_area(em_data, return = "plot", values = "abs")
#' }
#'
#' # Return summary table
#' \donttest{
#' workpatterns_area(em_data, return = "table")
#' }
#'
#' @family Working Patterns
#'

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

@ -54,7 +54,9 @@ collaboration_area(sq_data)
collaboration_area(sq_data, hrvar = "Organization")
# Return summary table
\donttest{
collaboration_area(sq_data, return = "table")
}
}
\seealso{

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

@ -42,7 +42,7 @@ Uses the metrics \code{External_network_size} and \code{Networking_outside_compa
}
\examples{
# Return plot
sq_data \%>\% external_network_plot(return = "plot")
external_network_plot(sq_data, return = "plot")
}
\seealso{

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

@ -162,12 +162,16 @@ em_data \%>\%
flex_index(return = "plot", plot_method = "common")
# Plot Flexibility Index over time
\donttest{
em_data \%>\%
flex_index(return = "plot", plot_method = "time")
}
# Return a summary table with the computed Flexibility Index
\donttest{
em_data \%>\%
flex_index(hrvar = "Organization", return = "table")
}
}
\seealso{

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

@ -43,10 +43,10 @@ Uses the metrics \code{Internal_network_size} and
}
\examples{
# Return plot
sq_data \%>\% internal_network_plot(return = "plot")
internal_network_plot(sq_data, return = "plot")
# Return summary table
sq_data \%>\% internal_network_plot(return = "table")
internal_network_plot(sq_data, return = "table")
}
\seealso{

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

@ -64,7 +64,9 @@ keymetrics_scan(sq_data)
keymetrics_scan(sq_data, low = "purple", high = "yellow")
# Return summary table
\donttest{
keymetrics_scan(sq_data, hrvar = "LevelDesignation", return = "table")
}
}
\seealso{

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

@ -54,12 +54,16 @@ a Standard Person Query as an input.
meeting_quality(sq_data, return = "plot")
# Return plot - showing multi-tasking \%
\donttest{
meeting_quality(sq_data,
metric_x = "Multitasking_meeting_hours",
return = "plot")
}
# Return summary table
\donttest{
meeting_quality(sq_data, return = "table")
}
}
\seealso{

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

@ -51,10 +51,12 @@ personas_hclust(sq_data,
k = 4)
# Return summary table
\donttest{
personas_hclust(sq_data,
metrics = c("Collaboration_hours", "Workweek_span"),
k = 4,
return = "table")
}
\donttest{
# Return data with clusters appended

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

@ -79,10 +79,14 @@ em_data <- em_data[em_data$Organization \%in\% orgs, ]
workpatterns_area(em_data, return = "plot", values = "percent")
# Return visualization of absolute values
\dontest{
workpatterns_area(em_data, return = "plot", values = "abs")
}
# Return summary table
\donttest{
workpatterns_area(em_data, return = "table")
}
}
\seealso{