pop_register: Population register

Description Usage Arguments Value Note Examples

View source: R/population-register.R

Description

Assign new ids to new population data.

Usage

1
pop_register(x, ind_data, hh_data = NULL)

Arguments

x

an R6 Population object.

ind_data

a data.table that contains individual data

hh_data

a data.table that contains household data

Value

a list contains ind_data and hh_data as data.tables.

Note

It is expected that the provided data in ind_data and hh_data have the same structure or columns as the individual and household data in the Population object in x. Also, it is crucial that all ids in the relationship columns do exist in the data of the new population data.

Examples

1
2
3
4
5
create_toy_world()

pop <- world$get("Population")

new_population_data <- pop_register(pop, toy_individuals, toy_households)

dymium-org/dymiumCore documentation built on July 18, 2021, 5:10 p.m.