Learn R Programming

sitree (version 0.1-15)

recover.state: Recovers the State

Description

It adds dead and removed trees to tr. This is an internal function that should not be run, in general, by a regular user.

Usage

recover.state(tr, dead.trees, removed.trees)

Value

A trList class object.

Arguments

tr

A trList class object.

dead.trees

A trListDead class object.

removed.trees

A trListDead class object.

Author

Clara Anton Fernandez caf@nibio.no

Details

In order to make calculations easier and lighter memory wise, at each cycle (period) of the simulation all removed (harvested) and dead trees are removed from tr, which only keeps alive trees at the current period. Once the simulation is finished recover.state returns all dead and removed trees to the last tr, so sitree can return a full list, including all trees alive at any point during the simulation, of trees.