View source: R/MRGpostProcess.R
MRGpostProcess | R Documentation |
Make some final adjustments to the multiresolution grids
MRGpostProcess(himg, vars, remCols = TRUE, rounding = -1)
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 |
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.
The function will return a post-processed multi-resolution grid
with non-confidential gridded data. See multiResGrid
for more
information.
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,]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.