From 176d8925fafefea9856e76e2ec36dc515a65fbbf Mon Sep 17 00:00:00 2001 From: aho Date: Fri, 26 Nov 2021 16:26:35 +0100 Subject: [PATCH 1/4] Add param 'drop' to keep the averaged dim --- R/MeanDims.R | 41 ++++++++++++++++++++++++++-------- man/MeanDims.Rd | 19 ++++++++++------ tests/testthat/test-MeanDims.R | 29 +++++++++++++++++++++++- 3 files changed, 72 insertions(+), 17 deletions(-) diff --git a/R/MeanDims.R b/R/MeanDims.R index 8d5d77b..9e5dd49 100644 --- a/R/MeanDims.R +++ b/R/MeanDims.R @@ -8,17 +8,21 @@ #' dimensions to average. #'@param na.rm A logical value indicating whether to ignore NA values (TRUE) or #' not (FALSE). -#'@return An array with the same dimension as parameter 'data' except the 'dims' -#' dimensions. -#' removed. +#'@param drop A logical value indicating whether to keep the averaged +#' dimension (FALSE) or drop it (TRUE). The default value is TRUE. +#'@return An array with the same dimension as parameter 'data' except the +#' 'dims' dimensions. If 'drop' is TRUE, 'dims' will be removed; if 'drop' is +#' FALSE, 'dims' will be preserved and the length will be 1. #' #'@examples -#'a <- array(rnorm(24), dim = c(2, 3, 4)) -#'MeanDims(a, 2) -#'MeanDims(a, c(2, 3)) +#'a <- array(rnorm(24), dim = c(dat = 2, member = 3, time = 4)) +#'ens_mean <- MeanDims(a, 'member') +#'dim(ens_mean) +#'ens_time_mean <- MeanDims(a, c(2, 3), drop = FALSE) +#'dim(ens_time_mean) #'@import multiApply #'@export -MeanDims <- function(data, dims, na.rm = FALSE) { +MeanDims <- function(data, dims, na.rm = FALSE, drop = TRUE) { # Check inputs ## data @@ -54,23 +58,42 @@ MeanDims <- function(data, dims, na.rm = FALSE) { if (!is.logical(na.rm) | length(na.rm) > 1) { stop("Parameter 'na.rm' must be one logical value.") } + ## drop + if (!is.logical(drop) | length(drop) > 1) { + stop("Parameter 'drop' must be one logical value.") + } + ############################### # Calculate MeanDims dim_data <- dim(data) if (length(dims) == length(dim_data)) { - data <- mean(data, na.rm = na.rm) + if (drop) { + data <- as.array(mean(data, na.rm = na.rm)) + } else { + data <- array(mean(data, na.rm = na.rm), + dim = rep(1, length(dim_data))) + names(dim(data)) <- names(dim_data) + } } else { if (is.character(dims)) { dims <- which(names(dim_data) %in% dims) } pos <- (1:length(dim_data))[-dims] data <- apply(data, pos, mean, na.rm = na.rm) - + + # If data is vector if (is.null(dim(data))) { data <- array(data, dim = dim_data[-dims]) } + if (!drop) { + restore_dim <- as.array(rep(1, length(dims))) + names(restore_dim) <- names(dim_data)[dims] + data <- array(data, dim = c(dim(data), restore_dim)) + data <- Reorder(data, names(dim_data)) + } } + return(data) } diff --git a/man/MeanDims.Rd b/man/MeanDims.Rd index f70b78b..721866b 100644 --- a/man/MeanDims.Rd +++ b/man/MeanDims.Rd @@ -4,7 +4,7 @@ \alias{MeanDims} \title{Average an array along multiple dimensions} \usage{ -MeanDims(data, dims, na.rm = FALSE) +MeanDims(data, dims, na.rm = FALSE, drop = TRUE) } \arguments{ \item{data}{An array to be averaged.} @@ -14,18 +14,23 @@ dimensions to average.} \item{na.rm}{A logical value indicating whether to ignore NA values (TRUE) or not (FALSE).} + +\item{drop}{A logical value indicating whether to keep the averaged +dimension (FALSE) or drop it (TRUE). The default value is TRUE.} } \value{ -An array with the same dimension as parameter 'data' except the 'dims' - dimensions. - removed. +An array with the same dimension as parameter 'data' except the + 'dims' dimensions. If 'drop' is TRUE, 'dims' will be removed; if 'drop' is + FALSE, 'dims' will be preserved and the length will be 1. } \description{ This function returns the mean of an array along a set of dimensions and preserves the dimension names if it has. } \examples{ -a <- array(rnorm(24), dim = c(2, 3, 4)) -MeanDims(a, 2) -MeanDims(a, c(2, 3)) +a <- array(rnorm(24), dim = c(dat = 2, member = 3, time = 4)) +ens_mean <- MeanDims(a, 'member') +dim(ens_mean) +ens_time_mean <- MeanDims(a, c(2, 3), drop = FALSE) +dim(ens_time_mean) } diff --git a/tests/testthat/test-MeanDims.R b/tests/testthat/test-MeanDims.R index 9c7c566..a431b99 100644 --- a/tests/testthat/test-MeanDims.R +++ b/tests/testthat/test-MeanDims.R @@ -57,7 +57,10 @@ test_that("1. Input checks", { MeanDims(dat1, dims = 'ftime', na.rm = na.omit), "Parameter 'na.rm' must be one logical value." ) - + expect_error( + MeanDims(dat1, dims = 'ftime', drop = 'selected'), + "Parameter 'drop' must be one logical value." + ) }) ############################################## @@ -79,6 +82,26 @@ test_that("2. Output checks: dat1", { MeanDims(dat1, dims = c('sdate'))[1:2], c(3, 8) ) + expect_equal( + dim(MeanDims(dat1, dims = 1:2, drop = F)), + c(dat = 1, sdate = 1, ftime = 4) + ) + expect_equal( + as.vector(drop(MeanDims(dat1, dims = 1:2, drop = F))), + as.vector(MeanDims(dat1, dims = 1:2, drop = T)) + ) + expect_equal( + dim(MeanDims(dat1, dims = 1:3, drop = F)), + c(dat = 1, sdate = 1, ftime = 1) + ) + expect_equal( + dim(MeanDims(dat1, dims = 1:3, drop = T)), + 1 + ) + expect_equal( + as.vector(drop(MeanDims(dat1, dims = 1:3, drop = F))), + as.vector(MeanDims(dat1, dims = 1:3, drop = T)) + ) }) @@ -126,6 +149,10 @@ test_that("5. Output checks: dat4", { length(MeanDims(dat4, dims = 1)), 1 ) + expect_equal( + dim(MeanDims(dat4, dims = 1, drop = F)), + 1 + ) }) ############################################## -- GitLab From 6b3192a15de6d83170083884818f030a9de6fa15 Mon Sep 17 00:00:00 2001 From: aho Date: Fri, 26 Nov 2021 16:36:26 +0100 Subject: [PATCH 2/4] Fix regarding the format --- tests/testthat/test-RatioRMS.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-RatioRMS.R b/tests/testthat/test-RatioRMS.R index b70d6fb..11df46c 100644 --- a/tests/testthat/test-RatioRMS.R +++ b/tests/testthat/test-RatioRMS.R @@ -114,12 +114,12 @@ names(RatioRMS(exp2_1, exp2_2, obs2)), c('ratiorms', 'p.val') ) expect_equal( -RatioRMS(exp2_1, exp2_2, obs2)$p.val, +as.vector(RatioRMS(exp2_1, exp2_2, obs2)$p.val), 0.7418331, tolerance = 0.0001 ) expect_equal( -RatioRMS(exp2_1, exp2_2, obs2)$ratiorms, +as.vector(RatioRMS(exp2_1, exp2_2, obs2)$ratiorms), 0.8931399, tolerance = 0.0001 ) -- GitLab From 05a921f198e2c3a74f6da78c61951a4213d15df7 Mon Sep 17 00:00:00 2001 From: aho Date: Fri, 26 Nov 2021 16:41:52 +0100 Subject: [PATCH 3/4] Don't save plot output in examples to avoid generating the plot files during package check --- R/Ano.R | 2 +- R/Ano_CrossValid.R | 2 +- R/Clim.R | 2 +- R/RatioSDRMS.R | 3 +-- R/Smoothing.R | 3 +-- R/Spread.R | 8 ++++---- man/Ano.Rd | 2 +- man/Ano_CrossValid.Rd | 2 +- man/Clim.Rd | 2 +- man/RatioSDRMS.Rd | 3 +-- man/Smoothing.Rd | 3 +-- man/Spread.Rd | 8 ++++---- 12 files changed, 18 insertions(+), 22 deletions(-) diff --git a/R/Ano.R b/R/Ano.R index e0a69db..fe09514 100644 --- a/R/Ano.R +++ b/R/Ano.R @@ -24,7 +24,7 @@ #'\donttest{ #'PlotAno(ano_exp, ano_obs, startDates, #' toptitle = 'Anomaly', ytitle = c('K', 'K', 'K'), -#' legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano.png') +#' legends = 'ERSST', biglab = FALSE) #'} #'@import multiApply #'@export diff --git a/R/Ano_CrossValid.R b/R/Ano_CrossValid.R index 22e710a..9920502 100644 --- a/R/Ano_CrossValid.R +++ b/R/Ano_CrossValid.R @@ -47,7 +47,7 @@ #'\dontrun{ #'PlotAno(anomalies$exp, anomalies$obs, startDates, #' toptitle = paste('anomalies'), ytitle = c('K', 'K', 'K'), -#' legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano_crossvalid.eps') +#' legends = 'ERSST', biglab = FALSE) #'} #'@import multiApply #'@importFrom ClimProjDiags Subset diff --git a/R/Clim.R b/R/Clim.R index 21f97b6..d25b444 100644 --- a/R/Clim.R +++ b/R/Clim.R @@ -60,7 +60,7 @@ #'PlotClim(clim$clim_exp, clim$clim_obs, #' toptitle = paste('sea surface temperature climatologies'), #' ytitle = 'K', monini = 11, listexp = c('CMIP5 IC3'), -#' listobs = c('ERSST'), biglab = FALSE, fileout = 'tos_clim.eps') +#' listobs = c('ERSST'), biglab = FALSE) #'} #'@importFrom abind adrop #'@importFrom ClimProjDiags Subset diff --git a/R/RatioSDRMS.R b/R/RatioSDRMS.R index b74fbb4..00b5d14 100644 --- a/R/RatioSDRMS.R +++ b/R/RatioSDRMS.R @@ -47,8 +47,7 @@ #'\donttest{ #'PlotVsLTime(rsdrms_plot, toptitle = "Ratio ensemble spread / RMSE", ytitle = "", #' monini = 11, limits = c(-1, 1.3), listexp = c('CMIP5 IC3'), -#' listobs = c('ERSST'), biglab = FALSE, siglev = TRUE, -#' fileout = 'tos_rsdrms.eps') +#' listobs = c('ERSST'), biglab = FALSE, siglev = TRUE) #'} #' #'@import multiApply diff --git a/R/Smoothing.R b/R/Smoothing.R index d5fd2a5..e60e5cf 100644 --- a/R/Smoothing.R +++ b/R/Smoothing.R @@ -27,8 +27,7 @@ #'smooth_ano_obs <- Reorder(smooth_ano_obs, c(2, 3, 4, 1)) #' \donttest{ #'PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, -#' toptitle = "Smoothed Mediterranean mean SST", ytitle = "K", -#' fileout = "tos_smoothed_ano.png") +#' toptitle = "Smoothed Mediterranean mean SST", ytitle = "K") #' } #'@import plyr multiApply #'@export diff --git a/R/Spread.R b/R/Spread.R index 4b3bc6b..ceadc82 100644 --- a/R/Spread.R +++ b/R/Spread.R @@ -59,22 +59,22 @@ #' toptitle = "Inter-Quartile Range between ensemble members", #' ytitle = "K", monini = 11, limits = NULL, #' listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, -#' hlines = c(0), fileout = 'tos_iqr.png') +#' hlines = c(0)) #'PlotVsLTime(Reorder(spread$maxmin, c('dataset', 'stats', 'ftime')), #' toptitle = "Maximum minus minimum of the members", #' ytitle = "K", monini = 11, limits = NULL, #' listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, -#' hlines = c(0), fileout = 'tos_maxmin.png') +#' hlines = c(0)) #'PlotVsLTime(Reorder(spread$sd, c('dataset', 'stats', 'ftime')), #' toptitle = "Standard deviation of the members", #' ytitle = "K", monini = 11, limits = NULL, #' listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, -#' hlines = c(0), fileout = 'tos_sd.png') +#' hlines = c(0)) #'PlotVsLTime(Reorder(spread$mad, c('dataset', 'stats', 'ftime')), #' toptitle = "Median Absolute Deviation of the members", #' ytitle = "K", monini = 11, limits = NULL, #' listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, -#' hlines = c(0), fileout = 'tos_mad.png') +#' hlines = c(0)) #'} #' #'@import multiApply diff --git a/man/Ano.Rd b/man/Ano.Rd index d15ffd1..e4a2e38 100644 --- a/man/Ano.Rd +++ b/man/Ano.Rd @@ -35,6 +35,6 @@ ano_obs <- Ano(sampleData$obs, clim$clim_obs) \donttest{ PlotAno(ano_exp, ano_obs, startDates, toptitle = 'Anomaly', ytitle = c('K', 'K', 'K'), - legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano.png') + legends = 'ERSST', biglab = FALSE) } } diff --git a/man/Ano_CrossValid.Rd b/man/Ano_CrossValid.Rd index 1e91528..d2234a1 100644 --- a/man/Ano_CrossValid.Rd +++ b/man/Ano_CrossValid.Rd @@ -69,6 +69,6 @@ anomalies <- Ano_CrossValid(sampleData$mod, sampleData$obs) \dontrun{ PlotAno(anomalies$exp, anomalies$obs, startDates, toptitle = paste('anomalies'), ytitle = c('K', 'K', 'K'), - legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano_crossvalid.eps') + legends = 'ERSST', biglab = FALSE) } } diff --git a/man/Clim.Rd b/man/Clim.Rd index 78559bd..79a80b6 100644 --- a/man/Clim.Rd +++ b/man/Clim.Rd @@ -88,6 +88,6 @@ clim2 <- Clim(sampleData$mod, sampleData$obs, method = 'kharin', memb = FALSE) PlotClim(clim$clim_exp, clim$clim_obs, toptitle = paste('sea surface temperature climatologies'), ytitle = 'K', monini = 11, listexp = c('CMIP5 IC3'), - listobs = c('ERSST'), biglab = FALSE, fileout = 'tos_clim.eps') + listobs = c('ERSST'), biglab = FALSE) } } diff --git a/man/RatioSDRMS.Rd b/man/RatioSDRMS.Rd index 7dbd682..9a1db08 100644 --- a/man/RatioSDRMS.Rd +++ b/man/RatioSDRMS.Rd @@ -70,8 +70,7 @@ rsdrms_plot[, , 4, ] <- rsdrms$p.val \donttest{ PlotVsLTime(rsdrms_plot, toptitle = "Ratio ensemble spread / RMSE", ytitle = "", monini = 11, limits = c(-1, 1.3), listexp = c('CMIP5 IC3'), - listobs = c('ERSST'), biglab = FALSE, siglev = TRUE, - fileout = 'tos_rsdrms.eps') + listobs = c('ERSST'), biglab = FALSE, siglev = TRUE) } } diff --git a/man/Smoothing.Rd b/man/Smoothing.Rd index 8d4a558..4fcca4f 100644 --- a/man/Smoothing.Rd +++ b/man/Smoothing.Rd @@ -39,7 +39,6 @@ smooth_ano_exp <- Reorder(smooth_ano_exp, c(2, 3, 4, 1)) smooth_ano_obs <- Reorder(smooth_ano_obs, c(2, 3, 4, 1)) \donttest{ PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, - toptitle = "Smoothed Mediterranean mean SST", ytitle = "K", - fileout = "tos_smoothed_ano.png") + toptitle = "Smoothed Mediterranean mean SST", ytitle = "K") } } diff --git a/man/Spread.Rd b/man/Spread.Rd index 26e289e..df79908 100644 --- a/man/Spread.Rd +++ b/man/Spread.Rd @@ -79,22 +79,22 @@ PlotVsLTime(Reorder(spread$iqr, c('dataset', 'stats', 'ftime')), toptitle = "Inter-Quartile Range between ensemble members", ytitle = "K", monini = 11, limits = NULL, listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, - hlines = c(0), fileout = 'tos_iqr.png') + hlines = c(0)) PlotVsLTime(Reorder(spread$maxmin, c('dataset', 'stats', 'ftime')), toptitle = "Maximum minus minimum of the members", ytitle = "K", monini = 11, limits = NULL, listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, - hlines = c(0), fileout = 'tos_maxmin.png') + hlines = c(0)) PlotVsLTime(Reorder(spread$sd, c('dataset', 'stats', 'ftime')), toptitle = "Standard deviation of the members", ytitle = "K", monini = 11, limits = NULL, listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, - hlines = c(0), fileout = 'tos_sd.png') + hlines = c(0)) PlotVsLTime(Reorder(spread$mad, c('dataset', 'stats', 'ftime')), toptitle = "Median Absolute Deviation of the members", ytitle = "K", monini = 11, limits = NULL, listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, - hlines = c(0), fileout = 'tos_mad.png') + hlines = c(0)) } } -- GitLab From af9e53b3472a8d1acdc1d4053333e16cac8cbb2e Mon Sep 17 00:00:00 2001 From: aho Date: Fri, 26 Nov 2021 16:54:13 +0100 Subject: [PATCH 4/4] dontrun the plotting function in exxamples --- R/Ano.R | 2 +- R/Clim.R | 2 +- R/RatioSDRMS.R | 2 +- R/Smoothing.R | 2 +- R/Spread.R | 2 +- man/Ano.Rd | 2 +- man/Clim.Rd | 2 +- man/RatioSDRMS.Rd | 2 +- man/Smoothing.Rd | 2 +- man/Spread.Rd | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/R/Ano.R b/R/Ano.R index fe09514..c4c70a3 100644 --- a/R/Ano.R +++ b/R/Ano.R @@ -21,7 +21,7 @@ #'clim <- Clim(sampleData$mod, sampleData$obs) #'ano_exp <- Ano(sampleData$mod, clim$clim_exp) #'ano_obs <- Ano(sampleData$obs, clim$clim_obs) -#'\donttest{ +#'\dontrun{ #'PlotAno(ano_exp, ano_obs, startDates, #' toptitle = 'Anomaly', ytitle = c('K', 'K', 'K'), #' legends = 'ERSST', biglab = FALSE) diff --git a/R/Clim.R b/R/Clim.R index d25b444..d01cf5d 100644 --- a/R/Clim.R +++ b/R/Clim.R @@ -56,7 +56,7 @@ #'example(Load) #'clim <- Clim(sampleData$mod, sampleData$obs) #'clim2 <- Clim(sampleData$mod, sampleData$obs, method = 'kharin', memb = FALSE) -#'\donttest{ +#'\dontrun{ #'PlotClim(clim$clim_exp, clim$clim_obs, #' toptitle = paste('sea surface temperature climatologies'), #' ytitle = 'K', monini = 11, listexp = c('CMIP5 IC3'), diff --git a/R/RatioSDRMS.R b/R/RatioSDRMS.R index 00b5d14..8531303 100644 --- a/R/RatioSDRMS.R +++ b/R/RatioSDRMS.R @@ -44,7 +44,7 @@ #'rsdrms_plot <- array(dim = c(dim(rsdrms$ratio)[1:2], 4, dim(rsdrms$ratio)[3])) #'rsdrms_plot[, , 2, ] <- rsdrms$ratio #'rsdrms_plot[, , 4, ] <- rsdrms$p.val -#'\donttest{ +#'\dontrun{ #'PlotVsLTime(rsdrms_plot, toptitle = "Ratio ensemble spread / RMSE", ytitle = "", #' monini = 11, limits = c(-1, 1.3), listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, siglev = TRUE) diff --git a/R/Smoothing.R b/R/Smoothing.R index e60e5cf..1b31e65 100644 --- a/R/Smoothing.R +++ b/R/Smoothing.R @@ -25,7 +25,7 @@ #'smooth_ano_obs <- Smoothing(ano_obs, time_dim = 'ftime', runmeanlen = 12) #'smooth_ano_exp <- Reorder(smooth_ano_exp, c(2, 3, 4, 1)) #'smooth_ano_obs <- Reorder(smooth_ano_obs, c(2, 3, 4, 1)) -#' \donttest{ +#' \dontrun{ #'PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, #' toptitle = "Smoothed Mediterranean mean SST", ytitle = "K") #' } diff --git a/R/Spread.R b/R/Spread.R index ceadc82..9f1624a 100644 --- a/R/Spread.R +++ b/R/Spread.R @@ -54,7 +54,7 @@ #' name = 'member') #'spread <- Spread(smooth_ano_exp_m_sub, compute_dim = c('member', 'sdate')) #' -#'\donttest{ +#'\dontrun{ #'PlotVsLTime(Reorder(spread$iqr, c('dataset', 'stats', 'ftime')), #' toptitle = "Inter-Quartile Range between ensemble members", #' ytitle = "K", monini = 11, limits = NULL, diff --git a/man/Ano.Rd b/man/Ano.Rd index e4a2e38..e30467e 100644 --- a/man/Ano.Rd +++ b/man/Ano.Rd @@ -32,7 +32,7 @@ example(Load) clim <- Clim(sampleData$mod, sampleData$obs) ano_exp <- Ano(sampleData$mod, clim$clim_exp) ano_obs <- Ano(sampleData$obs, clim$clim_obs) -\donttest{ +\dontrun{ PlotAno(ano_exp, ano_obs, startDates, toptitle = 'Anomaly', ytitle = c('K', 'K', 'K'), legends = 'ERSST', biglab = FALSE) diff --git a/man/Clim.Rd b/man/Clim.Rd index 79a80b6..50ec0d9 100644 --- a/man/Clim.Rd +++ b/man/Clim.Rd @@ -84,7 +84,7 @@ the 'exp' and 'obs' are excluded when computing the climatologies. example(Load) clim <- Clim(sampleData$mod, sampleData$obs) clim2 <- Clim(sampleData$mod, sampleData$obs, method = 'kharin', memb = FALSE) -\donttest{ +\dontrun{ PlotClim(clim$clim_exp, clim$clim_obs, toptitle = paste('sea surface temperature climatologies'), ytitle = 'K', monini = 11, listexp = c('CMIP5 IC3'), diff --git a/man/RatioSDRMS.Rd b/man/RatioSDRMS.Rd index 9a1db08..f1f6f3d 100644 --- a/man/RatioSDRMS.Rd +++ b/man/RatioSDRMS.Rd @@ -67,7 +67,7 @@ rsdrms <- RatioSDRMS(sampleData$mod, sampleData$obs) rsdrms_plot <- array(dim = c(dim(rsdrms$ratio)[1:2], 4, dim(rsdrms$ratio)[3])) rsdrms_plot[, , 2, ] <- rsdrms$ratio rsdrms_plot[, , 4, ] <- rsdrms$p.val -\donttest{ +\dontrun{ PlotVsLTime(rsdrms_plot, toptitle = "Ratio ensemble spread / RMSE", ytitle = "", monini = 11, limits = c(-1, 1.3), listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, siglev = TRUE) diff --git a/man/Smoothing.Rd b/man/Smoothing.Rd index 4fcca4f..5769aa2 100644 --- a/man/Smoothing.Rd +++ b/man/Smoothing.Rd @@ -37,7 +37,7 @@ smooth_ano_exp <- Smoothing(ano_exp, time_dim = 'ftime', runmeanlen = 12) smooth_ano_obs <- Smoothing(ano_obs, time_dim = 'ftime', runmeanlen = 12) smooth_ano_exp <- Reorder(smooth_ano_exp, c(2, 3, 4, 1)) smooth_ano_obs <- Reorder(smooth_ano_obs, c(2, 3, 4, 1)) - \donttest{ + \dontrun{ PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, toptitle = "Smoothed Mediterranean mean SST", ytitle = "K") } diff --git a/man/Spread.Rd b/man/Spread.Rd index df79908..e26bc14 100644 --- a/man/Spread.Rd +++ b/man/Spread.Rd @@ -74,7 +74,7 @@ smooth_ano_exp_m_sub <- smooth_ano_exp - InsertDim(MeanDims(smooth_ano_exp, 'mem name = 'member') spread <- Spread(smooth_ano_exp_m_sub, compute_dim = c('member', 'sdate')) -\donttest{ +\dontrun{ PlotVsLTime(Reorder(spread$iqr, c('dataset', 'stats', 'ftime')), toptitle = "Inter-Quartile Range between ensemble members", ytitle = "K", monini = 11, limits = NULL, -- GitLab