subtotals: Get subtotals attached to a Counts object.

Description Usage Arguments Examples

Description

Extract the subtotals used by an object of class CountsWithSubtotals.

Usage

1
2
3
4
subtotals(object)

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

Arguments

object

An object of class CountsWithSubtotals.

Examples

1
2
3
4
5
6
7
8
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)

StatisticsNZ/dembase documentation built on Dec. 25, 2021, 4:49 p.m.