MRGpostProcess {MRG} | R Documentation |
Make some final adjustments to the multiresolution grids
Description
Make some final adjustments to the multiresolution grids
Usage
MRGpostProcess(himg, vars, remCols = TRUE, rounding = "varying")
Arguments
himg |
The grid resulting from a call to multiResGrid |
vars |
Variable(s) of interest that should be aggregated (necessary when ifg is used for individual farm specific anonymization rules) |
remCols |
Logical; Should intermediate columns be removed? Can be set
to FALSE for further analyses. Temporary columns will not be removed if their names
partly match the variable names of |
rounding |
either logical (FALSE) or an integer indicating the number
of decimal places
to be used. Negative values are allowed (such as the default
value rounding to the closest 10). See also the details
for |
Details
The postprocessing function is normally called directly from multiResGrid
.
However, it might be useful to check the values of the grid cells that
will be suppressed, and the values before rounding. In that case
multiResGrid
can be called with the argument postProcess = FALSE
,
and the post processing be done separately.
Value
The function will return a post-processed multi-resolution grid
with non-confidential gridded data. See multiResGrid
for more
information.
Examples
library(sf)
# These are SYNTHETIC agricultural FSS data
data(ifs_dk) # Census data
# Create spatial data
ifg = fssgeo(ifs_dk, locAdj = "LL")
# Set the base resolutions, and create a hierarchical list with gridded data
ress = 1000*2^(1:7)
ifl = gridData(ifg, "UAA", res = ress)
himg = multiResGrid(ifl, ifg = ifg, var = "UAA", weight = "EXT_CORE", postProcess = FALSE)
himgp = MRGpostProcess(himg, var = "UAA")
# Confidential grid cells, being suppressed in postProcessing
himg[himg$confidential,]