CRAN Package Check Results for Package biomod2

Last updated on 2019-12-07 07:56:07 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 3.3-7.1 35.69 221.82 257.51 ERROR
r-devel-linux-x86_64-debian-gcc 3.3-7.1 27.92 172.82 200.74 NOTE
r-devel-linux-x86_64-fedora-clang 3.3-7.1 292.16 NOTE
r-devel-linux-x86_64-fedora-gcc 3.3-7.1 295.47 NOTE
r-devel-windows-ix86+x86_64 3.3-7.1 52.00 298.00 350.00 OK
r-devel-windows-ix86+x86_64-gcc8 3.3-7.1 71.00 223.00 294.00 NOTE
r-patched-linux-x86_64 3.3-7.1 34.25 200.68 234.93 NOTE
r-patched-solaris-x86 3.3-7.1 393.10 NOTE
r-release-linux-x86_64 3.3-7.1 35.94 201.28 237.22 NOTE
r-release-windows-ix86+x86_64 3.3-7.1 57.00 208.00 265.00 OK
r-release-osx-x86_64 3.3-7.1 NOTE
r-oldrel-windows-ix86+x86_64 3.3-7.1 33.00 275.00 308.00 WARN
r-oldrel-osx-x86_64 3.3-7.1 OK

Check Details

Version: 3.3-7.1
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: 'maxent'
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64-gcc8, r-patched-linux-x86_64, r-patched-solaris-x86, r-release-linux-x86_64, r-release-osx-x86_64

Version: 3.3-7.1
Check: examples
Result: ERROR
    Running examples in 'biomod2-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: DF_to_ARRAY
    > ### Title: Convert a biomod2 data.frame (or list) into array
    > ### Aliases: DF_to_ARRAY LIST_to_ARRAY
    > ### Keywords: models, formula, options
    >
    > ### ** Examples
    >
    >
    > # species occurrences
    > DataSpecies <- read.csv(system.file("external/species/mammals_table.csv",
    + package="biomod2"), row.names = 1)
    > head(DataSpecies)
     X_WGS84 Y_WGS84 ConnochaetesGnou GuloGulo PantheraOnca PteropusGiganteus
    1 -94.5 82.00001 0 0 0 0
    2 -91.5 82.00001 0 1 0 0
    3 -88.5 82.00001 0 1 0 0
    4 -85.5 82.00001 0 1 0 0
    5 -82.5 82.00001 0 1 0 0
    6 -79.5 82.00001 0 1 0 0
     TenrecEcaudatus VulpesVulpes
    1 0 0
    2 0 0
    3 0 0
    4 0 0
    5 0 0
    6 0 0
    >
    > # the name of studied species
    > myRespName <- 'GuloGulo'
    >
    > # the presence/absences data for our species
    > myResp <- as.numeric(DataSpecies[,myRespName])
    >
    > # the XY coordinates of species data
    > myRespXY <- DataSpecies[,c("X_WGS84","Y_WGS84")]
    >
    >
    > # Environmental variables extracted from BIOCLIM (bio_3, bio_4, bio_7, bio_11 & bio_12)
    > myExpl = stack( system.file( "external/bioclim/current/bio3.grd",
    + package="biomod2"),
    + system.file( "external/bioclim/current/bio4.grd",
    + package="biomod2"),
    + system.file( "external/bioclim/current/bio7.grd",
    + package="biomod2"),
    + system.file( "external/bioclim/current/bio11.grd",
    + package="biomod2"),
    + system.file( "external/bioclim/current/bio12.grd",
    + package="biomod2"))
    >
    > # Keep only points where we have info
    > myExpl <- extract(myExpl, myRespXY)
    >
    > # 1. Formatting Data
    > myBiomodData <- BIOMOD_FormatingData(resp.var = myResp,
    + expl.var = myExpl,
    + resp.xy = myRespXY,
    + resp.name = myRespName)
    
    -=-=-=-=-=-=-=-=-=-=-=-=-=-= GuloGulo Data Formating -=-=-=-=-=-=-=-=-=-=-=-=-=-=
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    biomod2
     --- call from context ---
    .BIOMOD_FormatingData.check.args(resp.var, expl.var, resp.xy,
     resp.name, eval.resp.var, eval.expl.var, eval.resp.xy, PA.nb.rep,
     PA.nb.absences, PA.strategy, PA.dist.min, PA.dist.max, PA.sre.quant,
     PA.table)
     --- call from argument ---
    if (!(class(expl.var) %in% available.types[-which(available.types ==
     "SpatialPoints")])) {
     stop(paste("Explanatory variable must be one of ", toString(available.types),
     sep = ""))
    }
     --- R stacktrace ---
    where 1: .BIOMOD_FormatingData.check.args(resp.var, expl.var, resp.xy,
     resp.name, eval.resp.var, eval.expl.var, eval.resp.xy, PA.nb.rep,
     PA.nb.absences, PA.strategy, PA.dist.min, PA.dist.max, PA.sre.quant,
     PA.table)
    where 2: BIOMOD_FormatingData(resp.var = myResp, expl.var = myExpl, resp.xy = myRespXY,
     resp.name = myRespName)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (resp.var, expl.var, resp.xy, resp.name, eval.resp.var,
     eval.expl.var, eval.resp.xy, PA.nb.rep, PA.nb.absences, PA.strategy,
     PA.dist.min, PA.dist.max, PA.sre.quant, PA.table)
    {
     if (grepl("_", resp.name) | grepl(" ", resp.name)) {
     resp.name <- paste(unlist(strsplit(resp.name, "_")),
     collapse = ".")
     resp.name <- paste(unlist(strsplit(resp.name, " ")),
     collapse = ".")
     cat("\n Response variable name was converted into", resp.name)
     }
     available.types <- c("numeric", "data.frame", "matrix", "RasterLayer",
     "RasterStack", "SpatialPointsDataFrame", "SpatialPoints")
     if (!(class(resp.var) %in% available.types)) {
     stop(paste("Response variable must be one of ", toString(available.types),
     sep = ""))
     }
     if (inherits(resp.var, "Raster")) {
     stop("Raster response variable not supported yet ! \nPlease extract your Presences and your absences by yourself")
     }
     if (!(class(expl.var) %in% available.types[-which(available.types ==
     "SpatialPoints")])) {
     stop(paste("Explanatory variable must be one of ", toString(available.types),
     sep = ""))
     }
     if (inherits(resp.var, "SpatialPoints")) {
     if (!is.null(resp.xy)) {
     cat("\n ! XY coordinates of response variable will be ignored because spatial response object is given.")
     }
     resp.xy <- data.matrix(sp::coordinates(resp.var))
     if (class(resp.var) == "SpatialPointsDataFrame") {
     resp.var <- resp.var@data
     }
     else {
     cat("\n ! Response variable is considered as a only presences one... Is it really what you want?")
     resp.var <- rep(1, nrow(resp.xy))
     }
     }
     if (is.matrix(resp.var) | is.data.frame(resp.var)) {
     if (ncol(resp.var) > 1) {
     stop("You must give a monospecific response variable (1D object)")
     }
     else {
     resp.var <- as.numeric(resp.var[, 1])
     }
     }
     if (is.matrix(expl.var) | is.numeric(expl.var)) {
     expl.var <- as.data.frame(expl.var)
     }
     if (inherits(expl.var, "Raster")) {
     expl.var <- raster::stack(expl.var, RAT = FALSE)
     }
     if (inherits(expl.var, "SpatialPoints")) {
     expl.var <- as.data.frame(expl.var@data)
     }
     if (!is.null(resp.xy)) {
     if (ncol(resp.xy) != 2) {
     stop("if given, resp.xy must be a 2 column matrix or data.frame")
     }
     if (nrow(resp.xy) != length(resp.var)) {
     stop("Response variable and its coordinates don't match")
     }
     resp.xy <- as.data.frame(resp.xy)
     }
     resp.var[which(resp.var > 0)] <- 1
     resp.var[which(resp.var <= 0)] <- 0
     if (is.data.frame(expl.var)) {
     if (nrow(expl.var) != length(resp.var)) {
     stop("If explanatory variable is not a raster then dimentions of response variable and explanatory variable must match!")
     }
     }
     if (is.null(PA.table) & PA.nb.rep < 1) {
     cat("\n> No pseudo absences selection !")
     PA.strategy <- "none"
     PA.nb.rep <- 0
     }
     if (is.null(PA.strategy) & PA.nb.rep > 0) {
     cat("\n> Pseudo absences will be selected randomly !")
     PA.strategy <- "random"
     }
     if (!is.null(PA.table)) {
     cat("\n> Pseudo absences used will be user defined ones !")
     PA.strategy <- "user.defined"
     PA.nb.rep <- 0
     }
     if (PA.strategy == "user.defined") {
     if (!(is.matrix(PA.table) | is.data.frame(PA.table)))
     stop("\n PA.table must be a matrix or a data.frame")
     if (nrow(PA.table) != length(resp.var))
     stop("\n PA.table must have as many row than the number \n of observation of your response variable")
     colnames(PA.table) <- paste("PA", 1:ncol(PA.table), sep = "")
     }
     if (!is.null(eval.resp.var)) {
     if (!(class(eval.resp.var) %in% available.types)) {
     stop(paste("Response variable must be one of ", toString(available.types),
     sep = ""))
     }
     if (inherits(eval.resp.var, "Raster")) {
     stop("Raster response variable not supported yet ! \nPlease extract your Presences and your absences by yourself")
     }
     if (!is.null(eval.expl.var)) {
     if (!(class(eval.expl.var) %in% available.types[-which(available.types ==
     "SpatialPoints")])) {
     stop(paste("Explanatory variable must be one of ",
     toString(available.types), sep = ""))
     }
     }
     else {
     if (!(inherits(expl.var, "Raster"))) {
     stop("If explanatory variable is not a raster and you want to consider evaluation response variable, you have to give evaluation explanatory variables")
     }
     }
     if (inherits(eval.resp.var, "SpatialPoints")) {
     if (!is.null(eval.resp.xy)) {
     cat("\n ! XY coordinates of response variable will be ignored because spatial response object is given.")
     }
     eval.resp.xy <- data.matrix(sp::coordinates(eval.resp.var))
     if (class(eval.resp.var) == "SpatialPointsDataFrame") {
     eval.resp.var <- eval.resp.var@data
     }
     else {
     cat("\n ! Response variable is considered as a only presences one... Is it really what you want?")
     eval.resp.var <- rep(1, nrow(eval.resp.xy))
     }
     }
     if (is.matrix(eval.resp.var) | is.data.frame(eval.resp.var)) {
     if (ncol(eval.resp.var) > 1) {
     stop("You must give a monospecific response variable (1D object)")
     }
     else {
     eval.resp.var <- as.numeric(eval.resp.var[, 1])
     }
     }
     if (is.matrix(eval.expl.var) | is.numeric(eval.expl.var)) {
     eval.expl.var <- as.data.frame(eval.expl.var)
     }
     if (inherits(eval.expl.var, "Raster")) {
     eval.expl.var <- raster::stack(eval.expl.var)
     }
     if (inherits(eval.expl.var, "SpatialPoints")) {
     eval.expl.var <- as.data.frame(eval.expl.var@data)
     }
     if (!is.null(eval.resp.xy)) {
     if (ncol(eval.resp.xy) != 2) {
     stop("if given, resp.xy must be a 2 column matrix or data.frame")
     }
     if (nrow(eval.resp.xy) != length(eval.resp.var)) {
     stop("Response variable and its coordinates don't match")
     }
     eval.resp.xy <- as.data.frame(eval.resp.xy)
     }
     if (is.data.frame(eval.expl.var)) {
     if (nrow(eval.expl.var) != length(eval.resp.var)) {
     stop("If explanatory variable is not a raster then dimentions of response variable and explanatory variable must match!")
     }
     }
     if (sum(is.na(eval.resp.var)) > 0) {
     cat("\n ! NAs have been automaticly removed from Evaluation data")
     if (!is.null(eval.resp.xy)) {
     eval.resp.xy <- eval.resp.xy[-which(is.na(eval.resp.var)),
     ]
     }
     eval.resp.var <- na.omit(eval.resp.var)
     }
     eval.resp.var[which(eval.resp.var > 0)] <- 1
     eval.resp.var[which(eval.resp.var <= 0)] <- 0
     if (sum(eval.resp.var == 1) < 1 | sum(eval.resp.var ==
     0) < 1) {
     stop("Evaluation response data must have both presences and absences")
     }
     }
     else {
     cat("\n ! No data has been set aside for modeling evaluation")
     eval.expl.var <- eval.resp.xy <- NULL
     }
     return(list(resp.var = resp.var, expl.var = expl.var, resp.xy = resp.xy,
     resp.name = resp.name, eval.resp.var = eval.resp.var,
     eval.expl.var = eval.expl.var, eval.resp.xy = eval.resp.xy,
     PA.nb.rep = PA.nb.rep, PA.nb.absences = PA.nb.absences,
     PA.strategy = PA.strategy, PA.dist.min = PA.dist.min,
     PA.dist.max = PA.dist.max, PA.sre.quant = PA.sre.quant,
     PA.table = PA.table))
    }
    <bytecode: 0x126cafd8>
    <environment: namespace:biomod2>
     --- function search by body ---
    Function .BIOMOD_FormatingData.check.args in namespace biomod2 has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (!(class(expl.var) %in% available.types[-which(available.types == :
     the condition has length > 1
    Calls: BIOMOD_FormatingData -> .BIOMOD_FormatingData.check.args
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 3.3-7.1
Check: for non-standard things in the check directory
Result: NOTE
    Found the following files/directories:
     'GuloGulo'
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 3.3-7.1
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Warning: S3 methods '[.fun_list', '[.grouped_df', 'all.equal.tbl_df', 'anti_join.data.frame', 'anti_join.tbl_df', 'arrange.data.frame', 'arrange.default', 'arrange.grouped_df', 'arrange.tbl_df', 'arrange_.data.frame', 'arrange_.tbl_df', 'as.data.frame.grouped_df', 'as.data.frame.rowwise_df', 'as.data.frame.tbl_cube', 'as.table.tbl_cube', 'as.tbl.data.frame', 'as.tbl.tbl', 'as.tbl_cube.array', 'as.tbl_cube.data.frame', 'as.tbl_cube.matrix', 'as.tbl_cube.table', 'as_tibble.grouped_df', 'as_tibble.tbl_cube', 'auto_copy.tbl_cube', 'auto_copy.tbl_df', 'cbind.grouped_df', 'collapse.data.frame', 'collect.data.frame', 'common_by.NULL', 'common_by.character', 'common_by.default', 'common_by.list', 'compute.data.frame', 'copy_to.DBIConnection', 'copy_to.src_local', 'default_missing.data.frame', 'default_missing.default', 'dim.tbl_cube', 'distinct.data.frame', 'distinct.default', 'distinct.grouped_df', 'distinct.tbl_df', 'distinct_.data.frame', 'distinct_.grouped_df', 'distinct_.tbl_df', 'do.NULL', 'do.da [... truncated]
Flavor: r-oldrel-windows-ix86+x86_64