diff --git a/.Rbuildignore b/.Rbuildignore index 2814b11b1187b7963ea8c1cf6a04e019ebe4392b..67f31a7dc4f35e1e02ede961a483bd9258b1285a 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -10,7 +10,7 @@ README\.md$ vignettes .gitlab-ci.yml # unit tests should be ignored when building the package for CRAN -^tests$ +#^tests$ # CDO is not in windbuilder, so we can test the unit tests by winbuilder # but test-CDORemap.R needs to be hidden #tests/testthat/test-CDORemap.R diff --git a/R/Load.R b/R/Load.R index e188299aa3cbacc9ae8a4da0f19c6fa19ab29917..cca99bf3612242029f43ebeb9f54bf3bed45db58 100644 --- a/R/Load.R +++ b/R/Load.R @@ -1545,7 +1545,7 @@ Load <- function(var, exp = NULL, obs = NULL, sdates, nmember = NULL, # If there are no experiments to load we need to choose a number of time steps # to load from observational datasets. We load from the first start date to # the current date. - if (is.null(exp) || dims == 0) { + if (is.null(exp) || identical(dims, 0)) { if (is.null(leadtimemax)) { diff <- Sys.time() - as.POSIXct(sdates[1], format = '%Y%m%d', tz = "UTC") if (diff > 0) { @@ -1866,12 +1866,12 @@ Load <- function(var, exp = NULL, obs = NULL, sdates, nmember = NULL, if (!is.null(dim_exp) && (length(unlist(dim_exp)) == length(dim_exp)) && !anyNA(unlist(dim_exp)) && !any(unlist(dim_exp) == 0)) { var_exp <- big.matrix(nrow = prod(unlist(dim_exp)), ncol = 1) - pointer_var_exp <- describe(var_exp) + pointer_var_exp <- bigmemory::describe(var_exp) } if (!is.null(dim_obs) && (length(unlist(dim_obs)) == length(dim_obs)) && !anyNA(unlist(dim_obs)) && !any(unlist(dim_obs) == 0)) { var_obs <- big.matrix(nrow = prod(unlist(dim_obs)), ncol = 1) - pointer_var_obs <- describe(var_obs) + pointer_var_obs <- bigmemory::describe(var_obs) } if (is.null(nprocs)) { nprocs <- detectCores()