read_pop1: Read Spectrum _pop1.xlsx export file

View source: R/read-spectrum-pop1.R

read_pop1R Documentation

Read Spectrum _pop1.xlsx export file

Description

Spectrum has a debug mode option to output a file recording the entire state space when a model simulation is computed. This function parse the *_pop1.xlsx file into long-format data.frame.

Usage

read_pop1(pop1file, country, years = 2000:2021)

Arguments

pop1file

path to *_pop1.xlsx export file

country

string giving the identifying country / region name to be added as a column in the output file

years

integer vector of years to extract

Details

TODO: tidy up the dependencies in this function: reshape, pryr, readxl.

TODO: Insert instructions for how to enter Spectrum debug mode.

'years' must be in the file as sheets, but this is not currently checked. It will fail hard. Inserting a check for this would make it fail softer.

Value

A data.frame consisting of pop1 file in long format


mrc-ide/eppasm documentation built on March 25, 2024, 9:19 p.m.