From 63ddc0204790fc9a8caa76311ba9c92dc83e7c3b Mon Sep 17 00:00:00 2001 From: GeraldineGomez Date: Tue, 12 Nov 2024 19:21:04 -0500 Subject: [PATCH] chore(plot_year): replace dontrun with donttest in examples Ref: #206 --- R/plotting.R | 11 +++++------ man/plot_years.Rd | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/R/plotting.R b/R/plotting.R index 4ffd295c..a4691bd8 100644 --- a/R/plotting.R +++ b/R/plotting.R @@ -1063,16 +1063,15 @@ plot_tabla_tipos_event <- function(data_agrupada, #' plot_years(data_agrupada, #' col_year = "ano" #' ) -#' \dontrun{ +#' \donttest{ +#' if (interactive()) { #' data_years <- import_data_event( #' nombre_event = "CHAGAS", -#' years = c(2019, 2020), -#' ) +#' years = c(2019, 2020)) #' data_limpia <- limpiar_data_sivigila(data_years) #' data_agrupada <- agrupar_years(data_event = data_limpia) -#' plot_years(data_agrupada, -#' col_year = "ano" -#' ) +#' plot_years(data_agrupada, col_year = "ano") +#' } #' } #' @export plot_years <- function(data_agrupada, diff --git a/man/plot_years.Rd b/man/plot_years.Rd index fe62f593..98aff40b 100644 --- a/man/plot_years.Rd +++ b/man/plot_years.Rd @@ -32,15 +32,14 @@ data_agrupada <- agrupar_years(data_event = data_limpia) plot_years(data_agrupada, col_year = "ano" ) -\dontrun{ +\donttest{ +if (interactive()) { data_years <- import_data_event( nombre_event = "CHAGAS", - years = c(2019, 2020), -) + years = c(2019, 2020)) data_limpia <- limpiar_data_sivigila(data_years) data_agrupada <- agrupar_years(data_event = data_limpia) -plot_years(data_agrupada, - col_year = "ano" -) +plot_years(data_agrupada, col_year = "ano") + } } }