prioritizr / prioritizr

# Compare ``` 70cc07f ... +2 ... 0197bdd ```

Showing 1 of 9 files from the diff.

@@ -288,24 +288,25 @@
 288 288 ` assertthat::assert_that(` 289 289 ` inherits(x, "ConservationProblem"),` 290 290 ` is.matrix(solution))` 291 + ` # convert NAs in solution to zeros` 292 + ` solution[is.na(solution)] <- 0` 291 293 ` # calculate amount of each feature in each planning unit` 292 294 ` total <- x\$feature_abundances_in_total_units()` 293 295 ` held <- vapply(` 294 296 ` seq_len(x\$number_of_zones()),` 295 297 ` FUN.VALUE = numeric(nrow(x\$data\$rij_matrix[[1]])),` 296 298 ` function(i) {` 297 - ` Matrix::rowSums(` 298 - ` x\$data\$rij_matrix[[i]] *` 299 + ` as.numeric(` 300 + ` x\$data\$rij_matrix[[i]] %*%` 299 301 ` Matrix::Matrix(` 300 302 ` solution[, i],` 301 - ` ncol = nrow(solution),` 302 - ` nrow = nrow(x\$data\$rij_matrix[[1]]),` 303 - ` byrow = TRUE,` 304 - ` sparse = FALSE` 305 - ` ),` 306 - ` na.rm = TRUE` 303 + ` ncol = 1,` 304 + ` nrow = nrow(solution),` 305 + ` sparse = TRUE` 306 + ` )` 307 307 ` )` 308 - ` })` 308 + ` }` 309 + ` )` 309 310 ` # prepare output` 310 311 ` if (x\$number_of_zones() == 1) {` 311 312 ` out <- tibble::tibble(`

### 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.

### Show failed CI and contexual commits c 4 Commits

Files Coverage
R -<.01% 98.39%
src 98.22%
Project Totals (128 files) 98.34%