scramble: Scramble a dataset

Description Usage Arguments

View source: R/scramble.R

Description

This is the workhorse function of the scramble package. It takes a dataset as input and returns a scrambled dataset. The scrambled dataset includes the same columns as the original dataset but these have been resampled in such a way that the associations between columns present in the original dataset are lost.

Usage

1
scramble(data, check.identical = TRUE)

Arguments

data

Data.frame. The original data. No default.

check.identical

Logical. If TRUE scramble checks that no observation in the original dataset is present in the scrambled dataset. The probability that this would happen is of course minimal, but this check is here as an fail-safe. Note that this operation may take a long time with large datasets, and can therefore be turned off at your own risk. Defaults to TRUE.


martingerdin/scrambler documentation built on Feb. 10, 2021, 9:39 a.m.