Shuffler: Shuffler class for applying 'shuffling' transform

ShufflerR Documentation

Shuffler class for applying 'shuffling' transform

Description

Create new Shuffler object

Update minimum vector size for shuffling

Apply the deidentifcation method to the supplied keys

Convert self to a list.

Arguments

method

[optional] A function representing the method of re-sampling to be used. By default uses exhaustive sampling without replacement.

keys

Value(s) to be transformed.

...

Value(s) to concatenate to keys and transform @inheritParams Pseudonymizer

limit

integer - the minimum number of observations a variable needs to have for shuffling to be performed. If the variable has length less than limit values are replaced with NAs.

Details

'Shuffling' refers to the a random sampling of a variable without replacement e.g. [A, B, C] becoming [B, A, C] but not [A, A, B]. Shuffling will preserve top level metrics (e.g. mean, median, mode) but removes ordinal properties i.e. correlations and auto-correlations

Fields

limit

minimum vector length to be shuffled. If vector to be transformed has length < limit, the data is replaced with NAs


deident documentation built on April 3, 2025, 6:14 p.m.