samrat_read_predictors.RdReads predictors from formatted samrat predictors file.
TODO: Link here to correct format for a predictors file
samrat_read_predictors(predictors_file, pars_list, check = TRUE)Name of predictors file
Parameter outputs from samrat_read_params()
Boolean for whether to check the output. Default = TRUE
Returns a list with 3 elements:
"demog_pars""Demography parameters list"
"pop_sources""Population source list of data.frames"
"dictionary""Demography Dictionary data.frame"
samrat_read_predictors Read samrat predictors
{
param_file <- system.file(
"extdata/som_analysis_parameters.xlsx", package = "samrat"
)
pars_list <- samrat_read_params(param_file)
predictors_file <- system.file(
"extdata/som_predictor_data.xlsx", package = "samrat"
)
predictors_list <- samrat_read_predictors(predictors_file, pars_list)
names(predictors_list)
}
#> [1] "predictors_list" "predictors" "manual_imputations"
#> [4] "dictionary"