| remove_sensitive {sdcSpatial} | R Documentation |
Remove sensitive cells from raster
Description
remove_sensitive removes sensitive cells from a sdc_raster.
The sensitive cells, as found by is_sensitive() are set to NA.
Usage
remove_sensitive(x, max_risk = x$max_risk, min_count = x$min_count, ...)
mask_sensitive(x, max_risk = x$max_risk, min_count = x$min_count, ...)
Arguments
x |
|
max_risk |
a risk value higher than |
min_count |
a count lower than |
... |
passed on to |
Details
Removing sensitive cells is a protection method, which often is useful to
finalize map protection after other protection methods have been applied.
mask_sensitive and remove_sensitive are synonyms, to accommodate both
experienced raster users as well as sdc users.
Value
sdc_raster object with sensitive cells set to NA.
See Also
Other sensitive:
disclosure_risk(),
is_sensitive_at(),
is_sensitive(),
plot_sensitive(),
sdc_raster(),
sensitivity_score()
Other protection methods:
protect_quadtree(),
protect_smooth()
Examples
library(raster)
unemployed <- sdc_raster(dwellings[1:2], dwellings$unemployed, r=200)
# plot the normally rastered data
plot(unemployed, zlim=c(0,1))
plot_sensitive(unemployed)
unemployed_safe <- remove_sensitive(unemployed, risk_type="discrete")
plot_sensitive(unemployed_safe, zlim=c(0,1))
print(unemployed)
unemployed$value