Skip to content

Commit

Permalink
plot_indicator_usage: small fix for test_areas=TRUE for some indica…
Browse files Browse the repository at this point in the history
…tors with broad test areas
  • Loading branch information
brownag committed Feb 12, 2024
1 parent 0154575 commit fd1f116
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions R/plot_indicator_usage.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ plot_indicator_usage <- function(indicator,
exc <- c(exc, unlist(ind$test_except_mlra))
}

xtst <- terra::subset(x, (x$LRRSYM %in% tst | x$MLRARSYM %in% tst) & !x$MLRARSYM %in% exc)

# TODO: are/will whole LRRs ever be excepted?
xtst <- terra::subset(x, (x$LRRSYM %in% tst | x$MLRARSYM %in% tst) &
!x$MLRARSYM %in% exc & !x$MLRARSYM %in% use)
xexc <- terra::subset(x, x$MLRARSYM %in% exc | x$LRRSYM %in% exc)

# create combined SpatVector with symbology column
Expand All @@ -66,7 +65,7 @@ plot_indicator_usage <- function(indicator,

if (test_areas) {
xtst$.internalUsageCategory <- "Testing"
xcmb <- rbind(xcmb, xtst)
xcmb <- rbind(xcmb[!xcmb$MLRARSYM %in% xtst$MLRARSYM], xtst)
}

if (is.null(ext)) {
Expand Down
3 changes: 1 addition & 2 deletions vignettes/fihs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ vignette: >
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
dpi = 36
comment = "#>"
)
```

Expand Down

0 comments on commit fd1f116

Please sign in to comment.