corrupt_data: corrupt_data

Description Usage Arguments Value Examples

View source: R/corrupt_data.R

Description

Takes data frame, returns data frame where each column is subjected to the passed in corruption functions.

Usage

1
2
corrupt_data(df, ..., .v = FALSE, col_names = NULL,
  col_contams = NULL)

Arguments

df

Data frame to be corrupted

numeric_cor

Names of columns to be corrupted numerically

string_cor

Names of columns to be corrupted with string corruption.

replace_cor

Names of columns to be corruped with replacement corruption

er

Vector of error rates for each function, or single value to be applied by all functions. Default is .1.

v

Verbose tag. Default is false

Value

Corrupted data frame

Examples

1
2
3
4
data_size = 500
rec <- generate_data(data_size)
error <-  .6
corrupt_rec <- corrupt_data(rec, numeric_cor = c("zipcode","birthyear"),string_cor = c("names"),replace_cor = c("town"),er = error, v = TRUE)

Sam-Murray/RecordLinkUtil documentation built on Oct. 30, 2019, 11:48 p.m.