subtotals {dembase}R Documentation

Get subtotals attached to a Counts object.

Description

Extract the subtotals used by an object of class CountsWithSubtotals.

Usage

subtotals(object)

## S4 method for signature 'CountsWithSubtotals'
subtotals(object)

Arguments

object

An object of class CountsWithSubtotals.

Examples

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)

[Package dembase version 0.0.0.119 Index]