View source: R/S3_classes_ccmpp_input_fert_rate_df.R
fert_rate_age_f | R Documentation |
fert_rate_age_f
fert_rate_age_f
is a subclass of
ccmpp_input_df
. It imposes four additional conditions:
The value_type
attribute is “rate”.
All elements of the “value” column must be non-negative.
There can be no 'sex' dimension; all fertility rate inputs must be female fertility rates.
An additional attribute non_zero_fert_ages
, which
specifies the reproductive age range as a vector of
age_start
values (see “Details”).
fert_rate_age_f(x, ...) ## S3 method for class 'data.frame' fert_rate_age_f( x, non_zero_fert_ages = attr(x, "non_zero_fert_ages"), value_scale = attr(x, "value_scale") ) ## S3 method for class 'ccmpp_input_list' fert_rate_age_f(x) fert_rate_age_f(x) <- value
x |
An object for which a method is defined (see “Details”). |
... |
Passed to the low-level constructor. |
non_zero_fert_ages |
Numeric vector of unique ages indicating the reproductive age range. See the “Details” section. |
value_scale |
Numeric scalar indicating the value_scale of the
counts, e.g., |
Methods are defined for data.frame
s and
ccmpp_input_list
s, and possibly other objects as
well. The data.frame
method “constructs” an object
from x
. The ccmpp_input_list
method “extracts”
an object from x
. There is also a replacement function which
complements the extraction methods.
An attempt will be made to guess non_zero_fert_ages
if they
are not explicitly specified using the non_zero_fert_ages
argument.
If non_zero_fert_ages
are specified, they must be a subset
of ages(x)
and be equally spaced with spacing equal to
age_span(x)
.
Elements of the value
column corresponding to ages not
listed in non_zero_fert_ages
will be overwritten with zeros
(specifically as.double(0)
s).
An object of class fert_rate_age_f
.
Mark Wheldon
validate_ccmppWPP_object
for object validation,
ccmpp_input_df
for the class from which this one
inherits.
Other ccmpp_input_objects:
ccmpp_input_df()
,
ccmpp_input_list()
,
coerce_pop_count_age_sex_reference
,
death_count_age_sex()
,
death_probability_age_sex()
,
life_table_age_sex()
,
mig_net_count_age_sex()
,
mig_net_count_tot_b()
,
mig_net_rate_age_sex()
,
mig_parameter()
,
mort_rate_age_sex()
,
pop_count_age_sex_base()
,
srb()
,
survival_ratio_age_sex()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.