| subtotals {dembase} | R Documentation |
Extract the subtotals used by an object of class
CountsWithSubtotals.
subtotals(object) ## S4 method for signature 'CountsWithSubtotals' subtotals(object)
object |
An object of class |
library(demdata)
popn <- Counts(VAPopn)
popn <- extrapolate(popn, along = "age", labels = "45-49", type = "missing")
subtotals <- Counts(array(c(65000, 64000),
dim = 1:2,
dimnames = list(age = "45-49", sex = c("Male", "Female"))))
popn <- attachSubtotals(popn, subtotals = subtotals)
subtotals(popn)