freqDT | R Documentation |
A fast data.table
-based alternative to
raster::freq()
.
freqDT(x, ...) ## S4 method for signature 'RasterLayer' freqDT(x, digits = 0, value = NULL, useNA = c("ifany", "no", "always"), ...) ## S4 method for signature 'RasterStackBrick' freqDT( x, digits = 0, value = NULL, useNA = c("ifany", "no", "always"), merge = FALSE, ... )
x |
A |
... |
Additional arguments as for
|
digits |
Integer for rounding the cell values. Argument is
passed to |
value |
A single numeric, logical, or NA value. If supplied,
|
useNA |
Character (one of "no", "ifany", or "always"). What
to do with NA values? See |
merge |
Logical. If |
Joshua O'Brien
r <- raster(nrow = 18, ncol = 36) r[] <- runif(ncell(r)) r[1:5] <- NA r <- r * r * r * 5 freqDT(r) freqDT(r, value = 2) s <- stack(r, r*2, r*3) freqDT(s, merge = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.