prioritizr / prioritizr

Compare ce44f34 ... +2 ... 44081fd

Coverage Reach
R/problem.R R/planning_unit_solution_status.R R/eval_replacement_importance.R R/marxan_problem.R R/eval_ferrier_importance.R R/add_linear_constraints.R R/parameters.R R/eval_rare_richness_importance.R R/add_neighbor_constraints.R R/add_cbc_solver.R R/solve.R R/add_linear_penalties.R R/add_feature_contiguity_constraints.R R/add_lpsymphony_solver.R R/presolve_check.R R/add_rsymphony_solver.R R/marxan_boundary_data_to_matrix.R R/add_manual_targets.R R/add_boundary_penalties.R R/add_locked_in_constraints.R R/add_locked_out_constraints.R R/add_manual_locked_constraints.R R/add_manual_bounded_constraints.R R/add_connectivity_penalties.R R/compile.R R/eval_connectivity_summary.R R/boundary_matrix.R R/add_contiguity_constraints.R R/zones.R R/eval_target_coverage_summary.R R/internal.R R/add_shuffle_portfolio.R R/intersecting_units.R R/add_max_phylo_end_objective.R R/add_feature_weights.R R/eval_feature_representation_summary.R R/fast_extract.R R/add_max_phylo_div_objective.R R/add_loglinear_targets.R R/connectivity_matrix.R R/add_absolute_targets.R R/proximity_matrix.R R/add_relative_targets.R R/adjacency_matrix.R R/eval_boundary_summary.R R/rij_matrix.R R/write_problem.R R/predefined_optimization_problem.R R/add_min_largest_shortfall_objective.R R/add_cuts_portfolio.R R/add_max_utility_objective.R R/add_min_shortfall_objective.R R/add_max_features_objective.R R/OptimizationProblem-methods.R R/add_max_cover_objective.R R/pproto.R R/simulate.R R/category_vector.R R/loglinear_interpolation.R R/add_mandatory_allocation_constraints.R R/add_semicontinuous_decisions.R R/feature_abundances.R R/distribute_load.R R/eval_cost_summary.R R/eval_n_summary.R R/binary_stack.R R/add_min_set_objective.R R/run_calculations.R R/add_binary_decisions.R R/add_proportion_decisions.R R/category_layer.R R/Id.R R/branch_matrix.R R/misc.R R/number_of_zones.R R/number_of_features.R R/feature_names.R R/zone_names.R R/number_of_planning_units.R R/tbl_df.R R/number_of_total_units.R R/add_default_objective.R R/targets.R R/add_default_decisions.R R/waiver.R R/new_optimization_problem.R R/add_default_portfolio.R src/rcpp_apply_feature_contiguity_constraints.cpp src/rcpp_boundary_data.cpp src/rcpp_ferrier_score.cpp src/rcpp_apply_contiguity_constraints.cpp src/optimization_problem.cpp src/rcpp_apply_boundary_penalties.cpp src/rcpp_apply_max_phylo_objective.cpp src/rcpp_apply_min_largest_shortfall_objective.cpp src/rcpp_apply_connectivity_penalties.cpp src/rcpp_apply_max_cover_objective.cpp src/rcpp_apply_max_utility_objective.cpp src/rcpp_add_rij_data.cpp src/rcpp_apply_max_features_objective.cpp src/rcpp_apply_min_shortfall_objective.cpp src/rcpp_boundary_data.h src/rcpp_apply_neighbor_constraints.cpp src/rcpp_sp_to_polyset.cpp src/rcpp_boundary.cpp src/rcpp_summarize_exactextractr.cpp src/rcpp_branch_matrix.cpp src/rcpp_absolute_amount_held_by_solution.cpp src/optimization_problem.h src/rcpp_apply_min_set_objective.cpp src/rcpp_str_tree_to_sparse_matrix.cpp src/rcpp_list_to_matrix_indices.cpp src/rcpp_apply_linear_penalties.cpp src/functions.cpp src/rcpp_forbid_solution.cpp src/rcpp_connectivity.cpp src/rcpp_add_zones_constraints.cpp src/rcpp_apply_decisions.cpp src/rcpp_add_linear_constraints.cpp src/rcpp_apply_feature_weights.cpp src/rcpp_apply_bounded_constraints.cpp src/rcpp_apply_locked_constraints.cpp src/functions.h src/init.c

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 4 of 174 files from the diff.
Other files ignored by Codecov
man/zones.Rd has changed.
docs/index.html has changed.
NEWS.md has changed.
docs/404.html has changed.
docs/authors.html has changed.
README.md has changed.
docs/pkgdown.yml has changed.
README.Rmd has changed.
DESCRIPTION has changed.
R/package.R has changed.

@@ -32,6 +32,7 @@
Loading
32 32
#' values(r) <- 1
33 33
#'
34 34
#' # simulate data using a Gaussian field
35 +
#' # (note this requires the RandomFields package to be installed)
35 36
#' d <- simulate_data(r, n = 1, model = RandomFields::RMgauss())
36 37
#'
37 38
#' # plot simulated data
@@ -83,7 +84,8 @@
Loading
83 84
#' r <- raster(ncol=10, nrow=10, xmn=0, xmx=1, ymn=0, ymx=1)
84 85
#' values(r) <- 1
85 86
#'
86 -
#' # simulate 4 species
87 +
#' # simulate data for 4 species
88 +
#' # (note this requires the RandomFields package to be installed)
87 89
#' spp <- simulate_species(r, 4)
88 90
#'
89 91
#' # plot simulated species
@@ -114,6 +116,7 @@
Loading
114 116
#' values(r) <- 1
115 117
#'
116 118
#' # simulate data
119 +
#' # (note this requires the RandomFields package to be installed)
117 120
#' cost <- simulate_cost(r)
118 121
#'
119 122
#' # plot simulated species

@@ -90,6 +90,7 @@
Loading
90 90
#' # an additional budget of 1600 based on a secondary cost dataset
91 91
#'
92 92
#' # create a secondary cost dataset by simulating values
93 +
#' # (note this requires the RandomFields package to be installed)
93 94
#' sim_pu_raster2 <- simulate_cost(sim_pu_raster)
94 95
#'
95 96
#' # plot the primary cost dataset (sim_pu_raster) and

@@ -168,6 +168,7 @@
Loading
168 168
#' # now, let's examine a conservation planning exercise involving multiple
169 169
#' # management zones
170 170
#'
171 +
#' \dontrun{
171 172
#' # create targets for each feature within each zone,
172 173
#' # these targets indicate that each zone needs to represent 10% of the
173 174
#' # spatial distribution of each feature
@@ -176,6 +177,7 @@
Loading
176 177
#'
177 178
#' # create penalty data for allocating each planning unit to each zone,
178 179
#' # these data will be generated by simulating values
180 +
#' # (note this requires the RandomFields package to be installed)
179 181
#' penalty_stack <- simulate_cost(sim_pu_zones_stack[[1]],
180 182
#'                                n = number_of_zones(sim_features_zones))
181 183
#'
@@ -195,7 +197,6 @@
Loading
195 197
#' # print problem
196 198
#' print(p3)
197 199
#'
198 -
#' \dontrun{
199 200
#' # solve problem
200 201
#' s3 <- solve(p3)
201 202
#'

@@ -77,10 +77,12 @@
Loading
77 77
#' @aliases Zones-class ZonesCharacter ZonesRaster Zones
78 78
#'
79 79
#' @examples
80 +
#' \dontrun{
80 81
#' # load planning unit data
81 82
#' data(sim_pu_raster)
82 83
#'
83 84
#  # simulate distributions for three species under two management zones
85 +
#' # (note this requires the RandomFields package to be installed)
84 86
#' zone_1 <- simulate_species(sim_pu_raster, 3)
85 87
#' zone_2 <- simulate_species(sim_pu_raster, 3)
86 88
#'
@@ -108,6 +110,7 @@
Loading
108 110
#'            zone_names = c("zone1", "zone2", "zone3"),
109 111
#'            feature_names = c("spp1", "spp2"))
110 112
#' print(z)
113 +
#' }
111 114
#' @export
112 115
zones <- function(..., zone_names = NULL, feature_names = NULL) {
113 116
  # parse arguments

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R 94.92%
src 98.81%
Project Totals (124 files) 96.11%
Loading