indivsInfo_ReorderResults: Reorder a set of IBM results by life stage, individual and...

View source: R/indivsInfo_ReorderResults.R

indivsInfo_ReorderResultsR Documentation

Reorder a set of IBM results by life stage, individual and age

Description

Function to reorder a set of IBM results by life stage, individual and age.

Usage

indivsInfo_ReorderResults(
  resFolder,
  resFilePrefix,
  lifeStageInfo,
  classNames = NULL,
  startTime = NULL,
  verbose = TRUE
)

Arguments

resFolder

- path to folder with results

resFilePrefix

- prefix for file names (default = "Results")

lifeStageInfo

- life stage info (list) object

classNames

- optional vector of classNames to process (may need to process classes individually when file sizes are large)

startTime

- optional value to replace startTimes in model run (default=NULL)

verbose

- flag (T/F) to print processing info

Details

Requires package readr to read csv files.

Value

list of data frames by life stage type, with each dataframe ordered by start time, id, and time.

Note

Times in the csv files are interpreted by readr::read_csv as UTC, as well as in the reordered dataframes.

Assigning a value to the input startTime replaces all values of startTime from the model run with the input value in the resulting output. As such, startTime should only be given when, for example, the individuals in a DisMELS model run were initially released at the same time, but the simulation was restarted with all individuals at the start of a subsequent life stage (resulting in different startTimes for individuals in the DisMELS results for the restarted simulation). Replacing startTime for results from the restarted simulation output yields simulation results equivalent to a continuous model run (i.e., without the restart).


wStockhausen/rDisMELS documentation built on March 27, 2022, 1 a.m.