make.DeponsDyn: Make DeponsDyn object from data stored in data frame

View source: R/dyn-methods.R

make.DeponsDynR Documentation

Make DeponsDyn object from data stored in data frame

Description

Function for reading converting a data frame containing DEPONS simulation output to a DeponsDyn object.

Usage

make.DeponsDyn(
  oname,
  title = "NA",
  landscape = "NA",
  simtime = "NA",
  startday = "2000-01-01",
  timestep = 30,
  tz = "GMT"
)

Arguments

oname

Name of the object (data frame) that contains number of animals for each time step during the simulation, along with their energy and the amount of food in the landscape.

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).

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). Defaluts to 2000-01-01

timestep

Time step used in the model, in minutes. Defaults to 30 minutes in DEPONS.

tz

Time zone.

Value

DeponsDyn object containing simulation output

See Also

See DeponsDyn-class for details on what is stored in the output object.

Examples

data(porpoisedyn)
the.data <- as.data.frame(porpoisedyn)
the.data <- the.data[, c(1:4)]
names(the.data) <- c("tick", "PorpoiseCount", "FoodEnergyLevel", "PorpoiseEnergyLevel")
porpoisedyn2 <- make.DeponsDyn(the.data, startday="2010-01-01")
porpoisedyn2


jacobnabe/DEPONS2R documentation built on Nov. 20, 2024, 10:22 p.m.