mask | R Documentation |
Filters the data that satisfy a condition.
mask(x, ...)
## Default S3 method:
mask(x, tol.mask = 0, ...)
## S3 method for class 'data.grid'
mask(x, mask = NULL, window = NULL, set.NA = FALSE, warn = FALSE, ...)
## S3 method for class 'bin.den'
mask(
x,
mask = mask.default(x$binw, npsp.tolerance(2)),
window = NULL,
set.NA = FALSE,
warn = TRUE,
...
)
## S3 method for class 'bin.data'
mask(
x,
mask = NULL,
window = NULL,
set.NA = FALSE,
warn = FALSE,
filter.lp = TRUE,
...
)
## S3 method for class 'locpol.bin'
mask(
x,
mask = mask.default(x$binw, npsp.tolerance(2)),
window = NULL,
set.NA = FALSE,
warn = TRUE,
filter.lp = TRUE,
...
)
x |
object used to select a method (binned data, ...). |
... |
further arguments passed to or from other methods |
tol.mask |
tolerance. |
mask |
logical; vector (or array) indicating the selected values (not masked). |
window |
spatial window (values outside this window will be masked), currently an sp-object of class
extending |
set.NA |
logical; If |
warn |
logical; If |
filter.lp |
logical; If |
mask.default
returns the logical vector x > tol.mask
.
mask.bin.den
, mask.bin.data
and mask.locpol.bin
return an object of the same class as x
with the additional component $mask
and optionally $window
.
locpol
, locpolhcv
, binning
,
np.svar
, npsp.tolerance
.
mask(1:10, 5)
bin <- binning(aquifer[,1:2], aquifer$head, nbin = c(41,41), set.NA = TRUE)
str(mask(bin, mask(bin$binw), warn = TRUE))
str(mask(bin, mask(bin$binw, 1)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.