# as in makeProblem() with a single primary suppression
p <- sdc_testproblem(with_supps = TRUE)
sdcProb2df(p)
# vector input
specs_vec <- c(region = "D", gender = "male")
cell_info(p, specs = specs_vec)
# data.frame input
specs_df <- data.frame(
region = c("A", "D", "A"),
gender = c("male", "female", "female")
)
cell_info(p, specs = specs_df)
# protect the table
p_safe <- protectTable(p, method = "SIMPLEHEURISTIC")
# re-apply
cell_info(p_safe, specs = specs_df)
Run the code above in your browser using DataLab