Reads demography from formatted samrat demog_pars file. TODO: Link here to correct format for a parameter file

samrat_read_demography(demog_file, pars_list, check = TRUE)

Arguments

demog_file

Name of demogrpahy file

pars_list

Parameter outputs from samrat_read_params()

check

Boolean for whether to check the output. Default = TRUE

Value

Returns a list with 5 elements:

  • "demog_pars_list""Demography parameters list"

  • "pop_sources_list""Population source list of data.frames"

  • "demog_pars""Demography parameters data.frame"

  • "pop_sources""Population sources data.frame"

  • "dictionary""Demography Dictionary data.frame"

Details

samrat_read_demography Read samrat demography data

Examples

{

param_file <- system.file(
"extdata/som_analysis_parameters.xlsx", package = "samrat"
)
pars_list <- samrat_read_params(param_file)

demog_file <- system.file(
"extdata/som_demog_data.xlsx", package = "samrat"
)
demography_list <- samrat_read_demography(demog_file, pars_list)
names(demography_list)

}
#> [1] "demog_pars_list"  "pop_sources_list" "demog_pars"       "pop_sources"     
#> [5] "dictionary"