* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/Mapinguari.Rcheck’ * using R Under development (unstable) (2022-03-24 r81974) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘Mapinguari/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘Mapinguari’ version ‘1.0.0’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘Mapinguari’ can be installed ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... NOTE Namespaces in Imports field not imported from: ‘dplyr’ ‘rgdal’ ‘rlang’ ‘testthat’ All declared Imports should be used. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... [15s/21s] ERROR Running examples in ‘Mapinguari-Ex.R’ failed The error most likely occurred in: > ### Name: PETFUN > ### Title: Spatialize 'PET_fromTemp' function from package 'EcoHydrology' > ### Aliases: PETFUN > > ### ** Examples > > PET <- PETFUN(df_tmax, df_tmin, df_alt) ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- at /tmp/RtmpcqFn58/R.INSTALL10912c644fd95f/EcoHydRology/R/EstCloudiness.R#3: --- package (from environment) --- EcoHydRology --- call from context --- withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) --- call from argument --- Tx == -999 || Tn == -999 --- R stacktrace --- where 1: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) where 2 at /tmp/RtmpcqFn58/R.INSTALL10912c644fd95f/EcoHydRology/R/EstCloudiness.R#3: suppressWarnings(if (any(Tx == -999 || Tn == -999) && is.null(trans)) { print("Error: Please enter either Max&Min temp or transmissivity") } else { if (is.null(trans)) trans <- transmissivity(Tx, Tn) if (opt == "Black") { cl <- (0.34 - sqrt(0.34^2 + 4 * 0.458 * (0.803 - trans)))/(-2 * 0.458) cl[which(trans > 0.803)] <- 0 } else { cl <- 1 - (trans - transMin)/(transMax - transMin) } cl[which(cl > 1)] <- 1 cl[which(cl < 0)] <- 0 return(cl) }) where 3 at /tmp/RtmpcqFn58/R.INSTALL10912c644fd95f/EcoHydRology/R/PET_fromTemp.R#9: EstCloudiness(Tmax_C, Tmin_C) where 4: EcoHydRology::PET_fromTemp(Jday = rep(day[k], length(tmax_values)), Tmax_C = tmax_values, Tmin_C = tmin_values, lat_radians = lat_values, aspect = aspect_values, slope = slope_values, forest = forest_values) where 5: FUN(X[[i]], ...) where 6: lapply(1:12, function(k) { tmax_values <- raster::values(tmax[[k]]) tmin_values <- raster::values(tmin[[k]]) slope_values <- raster::values(slope) aspect_values <- raster::values(aspect) lat_values <- raster::values(lat_rad) if (class(forest) == "RasterStack" | class(forest) == "RasterLayer") { forest_values <- raster::values(forest) } else { forest_values <- rep(forest, length(tmax_values)) } tmax_values[is.na(tmax_values)] <- 0 tmin_values[is.na(tmin_values)] <- 0 slope_values[is.na(slope_values)] <- 0 lat_values[is.na(lat_values)] <- 0 aspect_values[is.na(aspect_values)] <- 0 forest_values[is.na(forest_values)] <- 0 PET_raster <- alt PET_values <- EcoHydRology::PET_fromTemp(Jday = rep(day[k], length(tmax_values)), Tmax_C = tmax_values, Tmin_C = tmin_values, lat_radians = lat_values, aspect = aspect_values, slope = slope_values, forest = forest_values) raster::values(PET_raster) <- PET_values PET_raster * 30000 }) where 7: PETFUN(df_tmax, df_tmin, df_alt) --- value of length: 312 type: logical --- [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [49] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [61] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [73] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [85] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [97] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [109] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [121] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [133] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [145] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [157] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [169] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [181] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [193] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [205] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [217] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [229] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [241] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [253] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [265] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [277] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [289] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [301] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE --- function from context --- function (expr, ...) { handlers <- list(...) classes <- names(handlers) parentenv <- parent.frame() if (length(classes) != length(handlers)) stop("condition handlers must be specified with a condition class") .Internal(.addCondHands(classes, handlers, parentenv, NULL, TRUE)) expr } --- function search by body --- Function withCallingHandlers in namespace base has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ OK * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 1 NOTE See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/Mapinguari.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 2:00.94, 71.80 + 7.91