remove_sensitive: Remove sensitive cells from raster

Description Usage Arguments Details Value See Also Examples

View source: R/remove_sensitive.R

Description

remove_sensitive removes sensitive cells from a sdc_raster. The sensitive cells, as found by is_sensitive() are set to NA.

Usage

1
2
3
4
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, plot_sensitive, sdc_raster, sensitivity_score

Other protection methods: protect_quadtree, protect_smooth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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 July 20, 2019, 1:04 a.m.