qualityControl | R Documentation |
Perform quality control on GIMMS NDVI3g data based on the companion flag
information. This is merely a wrapper around overlay
and, since
quality control is readily available through rasterizeGimms
, it
is strongly recommended to use the latter function for this purpose.
## S4 method for signature 'RasterStackBrick'
qualityControl(x, keep = NULL, filename = "", ...)
x |
A single 2-layered |
keep |
|
filename |
|
... |
Further arguments passed to |
If 'keep' is missing, the function will automatically skip quality control and return the input object.
A quality-controlled 'RasterLayer' object.
rasterizeGimms
, overlay
.
## Not run:
tmp <- tempdir()
## Download NDVI3g.v1 sample data
ecocast <- system.file("extdata", "inventory_ecv1.rds", package = "gimms")
gimms_files <- downloadGimms(readRDS(ecocast)[1], dsn = tmp)
## Import data as 'Raster*' objects
ndvi <- raster::raster(gimms_files, varname = "ndvi")
ndvi[ndvi[] %in% c(-32768, -3000)] <- NA
ndvi <- ndvi / 1e4
flag <- floor(raster::raster(gimms_files, varname = "percentile") / 2e3)
## Perform quality control and visualize
to_check <- stack(ndvi[[1]], flag[[1]])
qcl <- qualityControl(to_check, keep = 0)
plot(qcl)
## End(Not run)
## see also 'Examples' section in ?rasterizeGimms for automated quality check
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.