read.DeponsDyn: Reading DEPONS simulation output

View source: R/dyn-methods.R

read.DeponsDynR Documentation

Reading DEPONS simulation output

Description

Function for reading simulation output produced by DEPONS.

Usage

read.DeponsDyn(
  fname,
  title = "NA",
  landscape = "NA",
  simtime = "NA",
  startday = "2010-01-01",
  timestep = 30,
  tz = "UTC"
)

Arguments

fname

Name of the file (character) that contains number of animals for each time step during the simulation, along with their energy and the amount of food in the landscape. The name includes the path to the directory if this is not the current working directory.

title

Optional character string giving name of simulation

landscape

The landscape used in the simulation

simtime

Optional character string with the date and time when the simulation finished (format yyyy-mm-dd). If not provided this is obtained from name of input file

startday

The start of the period that the simulation represents, i.e. the real-world equivalent of 'tick 1' (character string of the form 'yyyy-mm-dd', or POSIXlt). Default "2010-01-01"

timestep

Time step used in the model, in minutes. Default 30 minutes.

tz

Time zone. In DEPONS times are generally assumed to be in "UTC" (Coordinated Universal Time).

Value

DeponsDyn object containing simulation output

See Also

See DeponsDyn-class for details on what is stored in the output object and as.data.frame for converting from data frame.

Examples

## Not run: 
dyn.file <- "/Applications/DEPONS 2.1/DEPONS/Statistics.2020.Sep.02.20_24_17.csv"
file.exists(dyn.file)
porpoisedyn <- read.DeponsDyn(dyn.file, startday=as.POSIXlt("2010-01-01", tz = "UTC"))
porpoisedyn

## End(Not run)

jacobnabe/DEPONS2R documentation built on Jan. 26, 2025, 9:33 a.m.