CRAN Package Check Results for Package mopa

Last updated on 2019-12-21 10:47:51 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0.1 16.55 148.57 165.12 ERROR
r-devel-linux-x86_64-debian-gcc 1.0.1 15.29 121.32 136.61 ERROR
r-devel-linux-x86_64-fedora-clang 1.0.1 251.54 OK
r-devel-linux-x86_64-fedora-gcc 1.0.1 250.30 OK
r-devel-windows-ix86+x86_64 1.0.1 46.00 189.00 235.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.0.1 45.00 260.00 305.00 OK
r-patched-linux-x86_64 1.0.1 OK
r-patched-solaris-x86 1.0.1 322.90 OK
r-release-linux-x86_64 1.0.1 15.19 167.18 182.37 OK
r-release-windows-ix86+x86_64 1.0.1 28.00 231.00 259.00 OK
r-release-osx-x86_64 1.0.1 OK
r-oldrel-windows-ix86+x86_64 1.0.1 17.00 249.00 266.00 OK
r-oldrel-osx-x86_64 1.0.1 OK

Check Details

Version: 1.0.1
Check: examples
Result: ERROR
    Running examples in 'mopa-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: OCSVMprofiling
    > ### Title: Environmental profiling with One-Classification Support Vector
    > ### Machine
    > ### Aliases: OCSVMprofiling
    >
    > ### ** Examples
    >
    > ## Load presence data
    > data(Oak_phylo2)
    >
    > ## Load climate data
    > destfile <- tempfile()
    > data.url <- "https://raw.githubusercontent.com/SantanderMetGroup/mopa/master/data/biostack.rda"
    > download.file(data.url, destfile)
    trying URL 'https://raw.githubusercontent.com/SantanderMetGroup/mopa/master/data/biostack.rda'
    Content type 'application/octet-stream' length 6885444 bytes (6.6 MB)
    ==================================================
    downloaded 6.6 MB
    
    > load(destfile, verbose = TRUE)
    Loading objects:
     biostack
    >
    > ## Spatial reference
    > projection(biostack$baseline) <- CRS("+proj=longlat +init=epsg:4326")
    > r <- biostack$baseline[[1]]
    > ## Background of the whole study area
    > bg <- backgroundGrid(r)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    mopa
     --- call from context ---
    boundingCoords(coordinates(sp_grid))
     --- call from argument ---
    if (class(xy) == "matrix") xy <- as.data.frame(xy)
     --- R stacktrace ---
    where 1: boundingCoords(coordinates(sp_grid))
    where 2: backgroundGrid(r)
    
     --- value of length: 2 type: logical ---
    [1] TRUE FALSE
     --- function from context ---
    function (xy)
    {
     if (class(xy) == "matrix")
     xy <- as.data.frame(xy)
     if (class(xy) == "data.frame") {
     pres.list <- list(xy)
     }
     else {
     pres.list <- xy
     }
     box <- numeric()
     l.box <- list()
     for (i in 1:length(pres.list)) {
     length(l.box) <- i
     box[1] <- min(pres.list[[i]][, 1])
     box[2] <- max(pres.list[[i]][, 1])
     box[3] <- min(pres.list[[i]][, 2])
     box[4] <- max(pres.list[[i]][, 2])
     l.box[[i]] <- box
     }
     names(l.box) <- names(pres.list)
     return(l.box)
    }
    <bytecode: 0xbe59dc0>
    <environment: namespace:mopa>
     --- function search by body ---
    Function boundingCoords in namespace mopa has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(xy) == "matrix") xy <- as.data.frame(xy) :
     the condition has length > 1
    Calls: backgroundGrid -> boundingCoords
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.0.1
Check: examples
Result: ERROR
    Running examples in ‘mopa-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: extractFromModel
    > ### Title: Extrac objects from lists returned by function 'mopaTrain'
    > ### Aliases: extractFromModel
    >
    > ### ** Examples
    >
    > ## Load presence data
    > data(Oak_phylo2)
    >
    > ## Load Climate data
    > destfile <- tempfile()
    > data.url <- "https://raw.githubusercontent.com/SantanderMetGroup/mopa/master/data/biostack.rda"
    > download.file(data.url, destfile)
    trying URL 'https://raw.githubusercontent.com/SantanderMetGroup/mopa/master/data/biostack.rda'
    Content type 'application/octet-stream' length 6885444 bytes (6.6 MB)
    ==================================================
    downloaded 6.6 MB
    
    > load(destfile, verbose = TRUE)
    Loading objects:
     biostack
    >
    > ## Spatial reference
    > r <- biostack$baseline[[1]]
    >
    > ## Create background grid
    > bg <- backgroundGrid(r)
    Warning in if (class(xy) == "matrix") xy <- as.data.frame(xy) :
     the condition has length > 1 and only the first element will be used
    > ## Generate pseudo-absences
    > RS_random <-pseudoAbsences(xy = Oak_phylo2, background = bg$xy,
    + exclusion.buffer = 0.083*5, prevalence = -0.5, kmeans = FALSE)
    Error in pseudoAbsences(xy = Oak_phylo2, background = bg$xy, exclusion.buffer = 0.083 * :
     xy and background do not have the same length
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc