dataset <- SSBtoolsData("magnitude1")
a1 <- SuppressDominantCells(data = dataset, numVar = "value",
dimVar = c("sector4", "geo"), n = 1:2, k = c(77, 99))
a1
wg <- data.frame(sector4 = "Ind*", geo = c("Ice????", "Portugal"))
wg
# Industry:Portugal not primary, but suppressed
a2 <- SuppressDominantCells(data = dataset, numVar = "value",
dimVar = c("sector4", "geo"), n = 1:2, k = c(77, 99),
wg = wg, primary = c(DominanceRule, PrimaryRemoveWg))
a2
# Industry:Portugal not primary and not suppressed
a3 <- SuppressDominantCells(data = dataset, numVar = "value",
dimVar = c("sector4", "geo"), n = 1:2, k = c(77, 99),
wg = wg, primary = c(DominanceRule, PrimaryRemoveWg),
candidates = CandidatesNumWg)
a3
# Industry:Portugal primary, but not suppressed
a4 <- SuppressDominantCells(data = dataset, numVar = "value",
dimVar = c("sector4", "geo"), n = 1:2, k = c(77, 99),
wg = wg, forced = ForcedWg, whenPrimaryForced = message)
a4
Run the code above in your browser using DataLab