Description Usage Arguments Details Value See Also Examples
Convert a DemographicArray
between
age-time, age-chort, and time-cohort formats.
1 2 3 4 | rotateAgeTime(object, to = NULL, name = NULL)
## S4 method for signature 'DemographicArray'
rotateAgeTime(object, to = NULL, name = NULL)
|
object |
An object of class |
to |
The dimtypes of |
name |
The name of the new age, time, or cohort dimension. |
If the array has dimensions with two out of the three
dimtypes
"age"
, "time"
,
"cohort"
, then replace one of these dimensions
with a new dimension with the missing dimtype, and
rearrange the array accordingly. If,
for instance, an array has dimensions with dimtypes
"age"
and "time"
, then replace either
the age or time dimension with a cohort dimension,
and rearrange cells within the array accordingly.
object
must have a regular age-time plan
(see hasRegularAgeTime
. Negative ages
are not allowed, and cohorts must not start
later than the last time point or period. object
must also not contain any "open" age intervals,
time intervals, or cohorts - ie intervals that include
positive or negative infinity.
The argument to
gives the dimensions used
in the new age-time plan. It can be one of
"age-time"
, "time-age"
,
"age-cohort"
, "cohort-age"
,
"time-chort"
, or "cohort-time"
.
The abbreviations "at"
, "ta"
,
"ac"
, "ca"
, "tc"
, or "ct"
can also be used. (For production code, however,
the full versions are better, since they
are more self-documenting.) to
is
not case-sensitive, and only enough characters to
uniquely identify the option need to be supplied.
By default the new dimension is named after the
corresponding dimtype: for instance, if the new
dimension has dimtype "cohort"
, then the
new dimension is named "cohort"
. However,
an alternative name can be provided via the
name
argument.
An object with the same class as object
.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.