Reference Class representing a region as Region_object
Source:R/region_base.R
Region_object-class.RdObject representing demographic and model-specific information for a single region.
Each region object contains information fields as well as calculated results of countries projections aggregated to respective regions allowing user to easily perform calculations and visualize the results on projection results for regions.
Fields
nameCharacter; name of the region e.g. "North America"
regionCharacter; region code identifying which countries belong to this region e.g. "NOAM"
structure_dataList; aggregated population structure matrices indexed by year label, summed across all countries in the region
previous_mortalitydata.table; aggregated mortality output for the region. Columns: Country, Country_code, Period, Sex (integer 1/2), Age_group, Structure, Region, then one column per religion
previous_fertilitydata.table; aggregated fertility (births) output for the region. Columns: Country, Country_code, Period, Mother_age_group, Structure, Region, Total, then one column per religion
previous_asfrdata.table; aggregated age-specific fertility rate output for the region. Columns: Country, Country_code, Period, Mother_age_group, Structure, Region, Total, then one column per religion; rows with Mother_age_group == "TFR" contain period totals
previous_fertility_exposuredata.table; aggregated women-population exposure for the region. Columns: Country, Country_code, Period, Mother_age_group, Structure, Region, Total, then one column per religion
previous_switchingdata.table; aggregated switching output for the region. Columns: Country, Country_code, Period, Origin_religion, Structure, Region (light mode) or additionally Sex, Age_group (full mode), then one column per destination religion
previous_immigrationdata.table; aggregated immigration output for the region. Columns: Destination, Country_code, Period, Structure, Origin, Region (light mode) or additionally Sex, Age_group (full mode), then one column per religion
previous_emigrationdata.table; aggregated emigration output for the region. Columns: Origin, Country_code, Period, Structure, Destination, Region (light mode) or additionally Sex, Age_group (full mode), then one column per religion
Examples
# Running a full projection is time-consuming.
# Wrapped in dontrun to avoid executing during documentation build.
if (FALSE) { # \dontrun{
obj <- test_object_generator(object_name = "example")
project(projection_object = obj, progress_bar = FALSE, save_totals = TRUE)
# Access a region object by name
reg <- obj$region_object_list[["NOAM"]]
reg$name # "NOAM"
length(reg$structure_data) # one entry per projection period
} # }