Package: MRG 0.3.10

MRG: Create Non-Confidential Multi-Resolution Grids

The need for anonymization of individual survey responses often leads to many suppressed grid cells in a regular grid. Here we provide functionality for creating multi-resolution gridded data, respecting the confidentiality rules, such as a minimum number of units and dominance by one or more units for each grid cell. The functions also include the possibility for contextual suppression of data. For more details see Skoien et al. (2025) <doi:10.48550/arXiv.2410.17601>.

Authors:Jon Olav Skoien [aut, cre], Nicolas Lampach [aut]

MRG_0.3.10.tar.gz
MRG_0.3.10.zip(r-4.7)MRG_0.3.10.zip(r-4.6)MRG_0.3.10.zip(r-4.5)
MRG_0.3.10.tgz(r-4.6-any)MRG_0.3.10.tgz(r-4.5-any)
MRG_0.3.10.tar.gz(r-4.7-any)MRG_0.3.10.tar.gz(r-4.6-any)
MRG_0.3.10.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
MRG/json (API)

# Install 'MRG' in R:
install.packages('MRG', repos = c('https://jskoien.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/jskoien/mrg/issues

Datasets:
  • ifs_dk - Test data sets for the MRG package

On CRAN:

Conda:

3.38 score 12 scripts 231 downloads 12 exports 59 dependencies

Last updated from:3267752ba9. Checks:7 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64ERROR217
source / vignettesOK290
linux-release-x86_64ERROR241
macos-release-arm64ERROR243
macos-oldrel-arm64ERROR478
windows-develERROR194
windows-releaseERROR677
windows-oldrelERROR183
wasm-releaseOK147

Exports:createMRGobjectfssgeogridDatalocAdjFunMRGclusterMRGfromDFMRGmergeMRGoverlapMRGplotMRGpostProcessmultiResGridremSmall

Dependencies:abindbootclassclassIntclicodetoolscpp11data.tabledatawizardDBIdplyre1071farverforeachgenericsggplot2gluegridExtragtableinsightisobanditeratorsKernSmoothlabelinglaekenlifecyclemagrittrMASSpillarpkgconfigplyrproxypurrrR6RColorBrewerRcpprlangs2S7scalessfsjlabelledsjmiscstarsstringistringrsurveyplanningterratibbletidyrtidyselectunitsutf8vardpoorvctrsviridisviridisLitewithrwk

MRG example

Rendered fromMRG.rmdusingknitr::rmarkdownon May 08 2026.

Last update: 2024-09-16
Started: 2024-09-16

Readme and manuals

Help Manual

Help pageTopics
Create a single object containing all necessary objects for multiResGrid functionscreateMRGobject print.MRG
Function that creates an sf-object from IFS datafssgeo
Function that converts point data to gridded data (polygon values) or a list of gridded datagridData
Test data sets for the MRG packageifs_dk
Function that modifies the observation locations, to reduce the risk that they are on grid cell boundarieslocAdjFun
Function that allows to apply parallel processingMRGcluster
Function to create a gridded (usually multi-resolution grid) from a data.frame or csv file with information about the corners and resolution, as typically can be downloaded from Eurostat. The function can also save the grid as a geo-object.MRGfromDF
Merge two or more multi-resolution grids to a common resolutionMRGmerge
Function that finds and merges overlapping grid cells in a multi-resolution grid The need for this function comes from an error in the gridding process, and it can be seen as symptom solving rather than solving the issue. This function will either just show the problematic grid cells or remove the overlaps.MRGoverlap
Convenience function based on ggplot2 to plot multi-resolution grids with some default suggestions For full flexibility it is better to use ggplot2 directly.The function can also be used for ordinary gridsMRGplot
Make some final adjustments to the multiresolution gridsMRGpostProcess
Create multi-resolution grids based on confidentiality or reliability restrictionsmultiResGrid multiResGrid.list multiResGrid.MRG multiResGrid.sf
Function that will move values from grid cells with small values to the ones with larger values for disclosure control reasonsremSmall