set_dua_level: Set data restriction level

Description Usage Arguments Examples

View source: R/dua.R

Description

Set data restrictions to one of the levels in the DUA crosswalk.

Usage

1
set_dua_level(level, deidentify_required = FALSE, id_column = NULL)

Arguments

level

String value of the data restriction level

deidentify_required

Set to TRUE if ID column must be changed to protect unique identifier.

id_column

Column with unique IDs that must be identified if deidentify_required == TRUE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## --------------
## Setup
## --------------
## set DUA crosswalk
dua_cw <- system.file('extdata', 'dua_cw.csv', package = 'duawranglr')
set_dua_cw(dua_cw)
## --------------

## set restrictions at first level
set_dua_level('level_i')

## ...same, but set unique ID column to be deidentified
set_dua_level('level_i', deidentify_required = TRUE, id_column = 'sid')

btskinner/duawranglr documentation built on June 13, 2021, 6:52 p.m.