getTableState: Extracts 'table.state' from a 'nosoiSim' object

View source: R/output_utilityFunctions.R

getTableStateR Documentation

Extracts table.state from a nosoiSim object

Description

This function extracts the table.state for the request host-type from a nosoiSim object. table.state is present only if there is any structure (discrete or continuous) used.

Usage

getTableState(nosoi.output, pop = "A")

Arguments

nosoi.output

an object of class nosoiSim

pop

the host-type to be extracted (either "A" or "B", if not dual-host, then "A")

Value

Returns a data.table with the requested data. The table.state (class data.table) contains informations the location of each host during time (one row is one host at one location). The structure of the table is the following:

hosts.ID

Unique identifier for the host, based on user-defined prefix and an integer.

state

State or coordinates (in that case state.x and state.y) in which the host is during that time interval.

current.env.value

(only if continuous structure is present) Environmental value (raster cell value) in which the host is at the end of the simulation.

current.cell.raster

(only if continuous structure is present) Raster cell numeric ID in which the host is at the end of the simulation.

time.from

Time-step at which the host moved to the location.

time.to

Time-step at which the host exited the location (either by exiting the simulation or moving somewhere else).


nosoi documentation built on May 29, 2024, 9 a.m.