remove_sensitive: Remove sensitive cells from raster

View source: R/remove_sensitive.R

remove_sensitiveR 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

sdc_raster object.

max_risk

a risk value higher than max_risk will be sensitive.

min_count

a count lower than min_count will be sensitive.

...

passed on to is_sensitive.

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


sdcSpatial documentation built on March 24, 2022, 5:05 p.m.