population {dembase}R Documentation

Extract population counts from a demographic account.

Description

A demographic account contains counts of population, plus one or more components such as births, deaths, or internal migration. population can be used to extract the population counts.

Usage

population(object)

## S4 method for signature 'DemographicAccount'
population(object)

## S4 method for signature 'DemographicArray'
population(object)

Arguments

object

An object of class DemographicAccount.

Value

A Counts object.

See Also

Counts for components can be extracted using function components.

Examples

population <- Counts(array(c(10, 15, 13, 16),
                           dim = c(2, 2),
                           dimnames = list(age = c("0-29", "30+"),
                                           time = c(1970, 2000))))
births <- Counts(array(13,
                       dim = c(1, 1),
                       dimnames = list(age = "30+",
                                       time = "1971-2000")))
deaths <- Counts(array(c(0, 9),
                       dim = c(2, 1),
                       dimnames = list(age = c("0-29", "30+"),
                                       time = c("1971-2000"))))
account <- Movements(population = population,
                     births = births,
                     exits = list(deaths = deaths))

population(account)

[Package dembase version 0.0.0.119 Index]