Description Usage Arguments Value Examples
Create an object of class DemographicArray
.
1 2 3 4 5 6 7 8 9 10 11 | DemographicArray(x, dimtypes = NULL)
## S4 method for signature 'array'
DemographicArray(x, dimtypes = NULL)
## S4 method for signature 'DemographicArray'
DemographicArray(x, dimtypes = NULL)
Counts(x, dimtypes = NULL)
Values(x, dimtypes = NULL)
|
x |
An array, with a complete set of dimnames. |
dimtypes |
A named character vector specifying dimtypes to be used by each dimension. |
A DemographicArray
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | x <- array(1:6,
dim = c(2, 3),
dimnames = list(sex = c("Female", "Male"),
age = c("0-14", "15-64", "65+")))
DemographicArray(x)
# specify dimtype
x <- array(1:6,
dim = c(2, 3),
dimnames = list(sex = c("Female", "Male"),
year = c("1945-1965", "1965-1985", "1985-2000")))
DemographicArray(x, dimtypes = c(year = "cohort"))
# specify dimtypes
x <- array(1:6,
dim = c(2, 3),
dimnames = list(sex = c("Female", "Male"),
year = c("1945-1965", "1965-1985", "1985-2000")))
DemographicArray(x,
dimtypes = c(year = "cohort"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.