Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Jan 4, 2024
1 parent e8913d8 commit 326c360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/hist.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ setMethod("hist", signature(x="SpatRaster"),
} else {
# TO DO: make a function that does this by block and combines all data into a single histogram
v <- spatSample(x, maxcell, method="regular", as.df=FALSE, as.raster=FALSE, warn=FALSE)
msg <- paste("a sample of", round(100 * length(v) / ncell(x)), "% of the cells was used", sep="")
msg <- paste("a sample of ", round(100 * length(v) / ncell(x)), "% of the cells was used", sep="")
if (any(is.na(v))) {
v <- stats::na.omit(v)
msg <- paste(msg, " (of which ", 100 - round(100 * length(v) / maxcell ), "% was NA)", sep="")
Expand Down

0 comments on commit 326c360

Please sign in to comment.