pop_count_age_sex: Constructor for class 'pop_count_age_sex'

View source: R/S3_classes_ccmpp_output_pop_count_age_sex_df.R

pop_count_age_sexR Documentation

Constructor for class pop_count_age_sex

Description

pop_count_age_sex is a subclass of ccmpp_output_df. It imposes two additional conditions:

  1. Value_type attribute equals “count”

  2. Within year and sex, age must start at 0.

It is intended as a class that can be used for the population counts produced by the CCMPP.

Usage

pop_count_age_sex(x, ...)

## S3 method for class 'data.frame'
pop_count_age_sex(x, value_scale = attr(x, "value_scale"), ...)

## S3 method for class 'ccmpp_input_list'
pop_count_age_sex(x, keep_baseline = TRUE, ...)

pop_count_age_sex_projected(x, ...)

## S3 method for class 'ccmpp_input_list'
pop_count_age_sex_projected(x)

Arguments

x

A base::data.frame or link{ccmpp_input_list} object.

...

Passed to the low-level constructor.

value_scale

Numeric scalar indicating the value_scale of the counts, e.g., 1, 1000, 1e6, etc.

keep_baseline

Logical, link{ccmpp_input_list} method: should the baseline population counts be included in the output?

Details

Methods for the creator function exist for base::data.frames and link{ccmpp_input_list}s. The latter is a wrapper for project_ccmpp_loop_over_time; it implements cohort component projection on the input list and returns the projected counts as a pop_count_age_sex object. pop_count_age_sex_projected is a more descriptively name wrapper for pop_count_age_sex.ccmpp_input_list(x, keep_baseline = FALSE). ccmpp_input_lists determine completely the population counts in subsequent times. As such, the ccmpp_input_list method can be viewed as a way of “extracting” these counts from the input.

pop_count_age_sex.ccmpp_input_list and pop_count_age_sex_projected return projected counts as an object of class pop_count_age_sex. For an alternative list output, see the underlying function project_ccmpp_loop_over_time.

Value

An object of class pop_count_age_sex.

Author(s)

Mark Wheldon

See Also

validate_ccmppWPP_object for object validation, ccmpp_output_df for the class from which this one inherits.

Other ccmpp_output_objects: ccmpp_output_df(), coerce_ccmpp_output_df


markalava/ccmppWPP documentation built on April 21, 2022, 12:36 a.m.