From 99d3cd861854808c8fdef4e130a3b7eef2023a16 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Thu, 17 Aug 2023 23:25:43 +0100 Subject: [PATCH] chore: add donttest clauses --- R/IV_by_Period.R | 3 ++- R/create_ITSA.R | 3 ++- R/subject_scan.R | 3 ++- R/tm_freq.R | 2 ++ R/workpatterns_hclust.R | 4 ++-- man/IV_by_period.Rd | 3 ++- man/create_ITSA.Rd | 3 ++- man/subject_scan.Rd | 3 ++- man/tm_freq.Rd | 2 ++ man/workpatterns_hclust.Rd | 4 ++-- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/R/IV_by_Period.R b/R/IV_by_Period.R index 21e4a229..63fe6f13 100644 --- a/R/IV_by_Period.R +++ b/R/IV_by_Period.R @@ -40,6 +40,7 @@ #' @family Time-series #' #' @examples +#' \donttest{ #' # Returns a data frame #' sq_data %>% #' IV_by_period( @@ -48,7 +49,7 @@ #' after_start = "2020-01-05", #' after_end = "2020-01-26" #' ) -#' +#' } #' @export IV_by_period <- diff --git a/R/create_ITSA.R b/R/create_ITSA.R index bb156c7c..0e791675 100644 --- a/R/create_ITSA.R +++ b/R/create_ITSA.R @@ -64,8 +64,8 @@ #' #' #' @examples +#' \donttest{ #' # Returns summary table -#' #' create_ITSA( #' data = sq_data, #' before_start = "12/15/2019", @@ -89,6 +89,7 @@ #' #' # Extract a plot as an example #' plot_list$Workweek_span +#' } #' #' @export diff --git a/R/subject_scan.R b/R/subject_scan.R index c31e7ac0..79b0ff86 100644 --- a/R/subject_scan.R +++ b/R/subject_scan.R @@ -50,6 +50,7 @@ #' @import ggplot2 #' #' @examples +#' \donttest{ #' # return a heatmap table for words #' mt_data %>% subject_scan(hrvar = "Organizer_Organization") #' @@ -68,7 +69,7 @@ #' #' # grouped by days #' mt_data %>% subject_scan(mode = "days") -#' +#' } #' @export subject_scan <- function(data, hrvar, diff --git a/R/tm_freq.R b/R/tm_freq.R index f1a2af6f..f3e6aa00 100644 --- a/R/tm_freq.R +++ b/R/tm_freq.R @@ -41,8 +41,10 @@ #' #' #' @examples +#' \donttest{ #' tm_freq(mt_data, token = "words") #' tm_freq(mt_data, token = "ngrams") +#' } #' #' @family Text-mining #' diff --git a/R/workpatterns_hclust.R b/R/workpatterns_hclust.R index b9a743b4..b7952fca 100644 --- a/R/workpatterns_hclust.R +++ b/R/workpatterns_hclust.R @@ -68,16 +68,16 @@ #' @importFrom tidyr replace_na #' #' @examples +#' \donttest{ #' # Run clusters, returning plot #' workpatterns_hclust(em_data, k = 5, return = "plot") #' #' # Run clusters, return raw data #' workpatterns_hclust(em_data, k = 4, return = "data") %>% head() #' -#' #' # Run clusters for instant messages only, return hclust object #' workpatterns_hclust(em_data, k = 4, return = "hclust", signals = c("IM")) -#' +#' } #' #' @family Clustering #' @family Working Patterns diff --git a/man/IV_by_period.Rd b/man/IV_by_period.Rd index 53de3295..7bc6164d 100644 --- a/man/IV_by_period.Rd +++ b/man/IV_by_period.Rd @@ -48,6 +48,7 @@ This function uses the Information Value algorithm to predict which Workplace Analytics metrics are most explained by the change in dates. } \examples{ +\donttest{ # Returns a data frame sq_data \%>\% IV_by_period( @@ -56,7 +57,7 @@ sq_data \%>\% after_start = "2020-01-05", after_end = "2020-01-26" ) - +} } \seealso{ Other Variable Association: diff --git a/man/create_ITSA.Rd b/man/create_ITSA.Rd index 2c67de32..d71b636a 100644 --- a/man/create_ITSA.Rd +++ b/man/create_ITSA.Rd @@ -72,8 +72,8 @@ has since been removed and dependent functions \code{Ljungbox()} incorporated in the \strong{wpa} package. } \examples{ +\donttest{ # Returns summary table - create_ITSA( data = sq_data, before_start = "12/15/2019", @@ -97,6 +97,7 @@ plot_list <- # Extract a plot as an example plot_list$Workweek_span +} } \seealso{ diff --git a/man/subject_scan.Rd b/man/subject_scan.Rd index 1011f0fe..2bad7c8d 100644 --- a/man/subject_scan.Rd +++ b/man/subject_scan.Rd @@ -87,6 +87,7 @@ grouped by a specified attribute such as organisational attribute, day of the week, or hours of the day. } \examples{ +\donttest{ # return a heatmap table for words mt_data \%>\% subject_scan(hrvar = "Organizer_Organization") @@ -105,5 +106,5 @@ mt_data \%>\% subject_scan(mode = "hours") # grouped by days mt_data \%>\% subject_scan(mode = "days") - +} } diff --git a/man/tm_freq.Rd b/man/tm_freq.Rd index bc0ffbaf..596ef50e 100644 --- a/man/tm_freq.Rd +++ b/man/tm_freq.Rd @@ -45,8 +45,10 @@ There is an option to remove stopwords by passing a data frame into the \code{stopwords} argument. } \examples{ +\donttest{ tm_freq(mt_data, token = "words") tm_freq(mt_data, token = "ngrams") +} } \seealso{ diff --git a/man/workpatterns_hclust.Rd b/man/workpatterns_hclust.Rd index c446f97a..10bebd28 100644 --- a/man/workpatterns_hclust.Rd +++ b/man/workpatterns_hclust.Rd @@ -80,16 +80,16 @@ In other words, the clustering is applied on a dataset where the collaboration h are averaged by person and calculated as \% of total daily collaboration. } \examples{ +\donttest{ # Run clusters, returning plot workpatterns_hclust(em_data, k = 5, return = "plot") # Run clusters, return raw data workpatterns_hclust(em_data, k = 4, return = "data") \%>\% head() - # Run clusters for instant messages only, return hclust object workpatterns_hclust(em_data, k = 4, return = "hclust", signals = c("IM")) - +} } \seealso{