Skip to content

Commit

Permalink
Fix values check
Browse files Browse the repository at this point in the history
- Fix checking of number of grey levels
  • Loading branch information
ailich committed Jan 22, 2024
1 parent 75c4fcc commit 52a3ee1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: GLCMTextures
Title: GLCM Textures of Raster Layers
Version: 0.4
Version: 0.4.1
Authors@R:
person(given = "Alexander",
family = "Ilich",
Expand Down
2 changes: 1 addition & 1 deletion R/make_glcm.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' @export

make_glcm<- function(x, n_levels, shift, na.rm = FALSE, normalize=TRUE){
if(any(isTRUE(x > (n_levels-1))) | any(isTRUE(x < 0))){
if(isTRUE(any(x > (n_levels-1))) | isTRUE(any(x < 0))){
stop("Error: x must have values between 0 and n_levels-1")
}
if(normalize){
Expand Down

0 comments on commit 52a3ee1

Please sign in to comment.