Skip to content

Commit

Permalink
#31 hasValues fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoodbody committed Mar 7, 2023
1 parent 3c73afe commit b07e587
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

`enhanced` - Sampling Vignette - Added content about `sample_existing()`

`fixed` - `strat_map()` - Fixed improper use of `terra::hasValues`. From Robert Hijmans #31

# sgsR 1.4.1

`fixed` - `sample_ahels()` - gave an erroneous error when `matrices` was provided and `nQuant` did not match. Changed to allow only `matrices` to be provided.
Expand Down
2 changes: 1 addition & 1 deletion R/strat_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ strat_map <- function(sraster,
}

#--- error handling for raster inputs ---#
if (isFALSE(sraster@ptr$hasValues)) {
if (isFALSE(terra::hasValues(sraster))) {
stop("'sraster' has no values.", call. = FALSE)
}

Expand Down

0 comments on commit b07e587

Please sign in to comment.