real <- data.frame(age = sample(20:60, 50, replace = TRUE),
income = sample(c("low", "high"), 50, replace = TRUE),
stringsAsFactors = FALSE)
syn <- real[sample(50), ]
attribute_disclosure_risk(real, syn, sensitive_col = "income", known_cols = "age")
Run the code above in your browser using DataLab