From 788fedc9531887e6f8d630717da7284ad4c0cbb5 Mon Sep 17 00:00:00 2001 From: aho Date: Mon, 7 Feb 2022 10:32:35 +0100 Subject: [PATCH] Fix typo and conditional statement for warnings --- R/CDORemapper.R | 4 ++-- R/Start.R | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/CDORemapper.R b/R/CDORemapper.R index 7d4620f..135a8cb 100644 --- a/R/CDORemapper.R +++ b/R/CDORemapper.R @@ -111,8 +111,8 @@ CDORemapper <- function(data_array, variables, file_selectors = NULL, if ('crop' %in% names(extra_params)) { .warning("Argument 'crop' in 'transform_params' for CDORemapper() is ", - "deprecated. It is automatically assigned as the selected .", - "domain in Start() call.") + "deprecated. It is automatically assigned as the selected domain ", + "in Start() call.") } extra_params[['crop']] <- crop_values } diff --git a/R/Start.R b/R/Start.R index d3a2b69..dc5b170 100644 --- a/R/Start.R +++ b/R/Start.R @@ -3433,7 +3433,7 @@ Start <- function(..., # dim = indices/selectors, if (type_of_var_to_crop == 'transformed') { if (!aiat) { if (!(length(selector_array) == 1 & - selector_array %in% c('all', 'first', 'last'))) { + all(selector_array %in% c('all', 'first', 'last')))) { vars_to_crop[[var_to_crop]] <- Subset(transformed_subset_var, inner_dim, crop_indices) } else { vars_to_crop[[var_to_crop]] <- @@ -3454,7 +3454,7 @@ Start <- function(..., # dim = indices/selectors, if (type_of_var_to_crop == 'transformed' & !aiat) { if (!(length(selector_array) == 1 & - selector_array %in% c('all', 'first', 'last'))) { + all(selector_array %in% c('all', 'first', 'last')))) { common_vars_to_crop[[common_var_to_crop]] <- Subset(transformed_subset_var, inner_dim, crop_indices) } else { -- GitLab