R/prepSpeciesLayers.R
changed.
Other files ignored by Codecov
DESCRIPTION
has changed.
380 | 380 | ## TODO: this is sneaky and annoying (runName is part of outputPath) |
|
381 | 381 | if (grepl("AOU", outputPath)) { |
|
382 | 382 | sA <- "ceon" |
|
383 | + | if (grepl("test", outputPath)) { |
|
384 | + | sAN <- "AOU_test" |
|
385 | + | } else { |
|
386 | + | sAN <- "AOU" |
|
387 | + | } |
|
383 | 388 | } else if (grepl("ROF", outputPath)) { |
|
384 | 389 | sA <- "rof" |
|
390 | + | if (grepl("test", outhputPath)) { |
|
391 | + | sAN <- "ROF_test" |
|
392 | + | } else { |
|
393 | + | sAN <- "ROF" |
|
394 | + | } |
|
385 | 395 | } |
|
386 | 396 | ||
387 | 397 | if (grepl("res125", outputPath)) { |
447 | 457 | ## merge species layers (currently only Popu; TODO: pine?) |
|
448 | 458 | idsPopu <- grep("Popu", CCstackNames) |
|
449 | 459 | mergedPopu <- calc(stack(CCstack[[idsPopu]]), sum, na.rm = TRUE) |
|
450 | - | mergedPopu <- writeRaster(mergedPopu, filename = file.path(outputPath, "ONFRI_Popu_spp.tif"), |
|
451 | - | overwrite = TRUE) |
|
452 | 460 | ||
453 | 461 | CCstack <- dropLayer(CCstack, idsPopu) |
|
454 | 462 | CCstack[["Popu_sp"]] <- mergedPopu ## NOTE: addLayer sporadically fails to add layer, w/o warning |
Files | Coverage |
---|---|
R | 0.00% |
Project Totals (19 files) | 0.00% |