CRAN Package Check Results for Package prioritizr

Last updated on 2019-08-25 05:46:55 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 4.1.1 307.47 397.48 704.95 NOTE
r-devel-linux-x86_64-debian-gcc 4.1.1 258.75 303.60 562.35 NOTE
r-devel-linux-x86_64-fedora-clang 4.1.1 962.17 NOTE
r-devel-linux-x86_64-fedora-gcc 4.1.1 952.98 NOTE
r-devel-windows-ix86+x86_64 4.1.1 680.00 682.00 1362.00 NOTE
r-patched-linux-x86_64 4.1.1 285.36 386.38 671.74 NOTE
r-patched-solaris-x86 4.1.1 1045.30 ERROR
r-release-linux-x86_64 4.1.1 287.06 386.34 673.40 NOTE
r-release-windows-ix86+x86_64 4.1.1 872.00 910.00 1782.00 NOTE
r-release-osx-x86_64 4.1.1 ERROR
r-oldrel-windows-ix86+x86_64 4.1.1 893.00 912.00 1805.00 NOTE
r-oldrel-osx-x86_64 4.1.1 ERROR

Check Details

Version: 4.1.1
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: 'gurobi'
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, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-windows-ix86+x86_64, r-oldrel-windows-ix86+x86_64

Version: 4.1.1
Check: installed package size
Result: NOTE
     installed size is 17.4Mb
     sub-directories of 1Mb or more:
     doc 1.8Mb
     libs 13.7Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-windows-ix86+x86_64, r-patched-solaris-x86, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64

Version: 4.1.1
Check: package dependencies
Result: NOTE
    Packages suggested but not available for checking:
     'gurobi', 'lpsymphony', 'Rsymphony'
Flavors: r-patched-solaris-x86, r-release-osx-x86_64

Version: 4.1.1
Check: examples
Result: ERROR
    Running examples in ‘prioritizr-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: feature_representation
    > ### Title: Feature representation
    > ### Aliases: feature_representation
    > ### feature_representation,ConservationProblem,numeric-method
    > ### feature_representation,ConservationProblem,matrix-method
    > ### feature_representation,ConservationProblem,data.frame-method
    > ### feature_representation,ConservationProblem,Spatial-method
    > ### feature_representation,ConservationProblem,Raster-method
    >
    > ### ** Examples
    >
    > # set seed for reproducibility
    > set.seed(500)
    >
    > # load data
    > data(sim_pu_raster, sim_pu_polygons, sim_features, sim_pu_zones_stack,
    + sim_pu_zones_polygons, sim_features_zones)
    >
    >
    > # create a simple conservation planning data set so we can see exactly
    > # how feature representation is calculated
    > pu <- data.frame(id = seq_len(10), cost = c(0.2, NA, runif(8)),
    + spp1 = runif(10), spp2 = c(rpois(9, 4), NA))
    >
    > # create problem
    > p1 <- problem(pu, c("spp1", "spp2"), cost_column = "cost") %>%
    + add_min_set_objective() %>%
    + add_relative_targets(0.1) %>%
    + add_binary_decisions()
    >
    > # create a solution
    > s1 <- data.frame(solution = c(1, NA, rep(c(1, 0), 4)))
    > print(s1)
     solution
    1 1
    2 NA
    3 1
    4 0
    5 1
    6 0
    7 1
    8 0
    9 1
    10 0
    >
    > # calculate feature representation
    > r1 <- feature_representation(p1, s1)
    > print(r1)
    # A tibble: 2 x 3
     feature absolute_held relative_held
     <chr> <dbl> <dbl>
    1 spp1 3.12 0.541
    2 spp2 14 0.424
    >
    > # verify that feature representation calculations are correct
    > all.equal(r1$absolute_held, c(sum(pu$spp1 * s1[[1]], na.rm = TRUE),
    + sum(pu$spp2 * s1[[1]], na.rm = TRUE)))
    [1] TRUE
    > all.equal(r1$relative_held, c(sum(pu$spp1 * s1[[1]], na.rm = TRUE) /
    + sum(pu$spp1),
    + sum(pu$spp2 * s1[[1]], na.rm = TRUE) /
    + sum(pu$spp2, na.rm = TRUE)))
    [1] TRUE
    >
    > # solve the problem using an exact algorithm solver
    > s1_2 <- solve(p1)
    Error in res(x, ...) : no optimization problem solvers found on system.
    Calls: solve ... solve -> .local -> <Anonymous> -> res -> <Anonymous> -> res
    Execution halted
Flavors: r-patched-solaris-x86, r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 4.1.1
Check: package dependencies
Result: NOTE
    Packages suggested but not available for checking:
     ‘gurobi’ ‘lpsymphony’ ‘Rsymphony’
Flavor: r-oldrel-osx-x86_64