simecol-package {simecol}R Documentation

General Information about the 'simecol' Package

Description

The simecol package is intended to give users (scientists and students) an interactive environment to implement, distribute, simulate and document ecological and other dynamic models without the need to write long simulation programs. For this purpose, an object oriented approach using the textbf{S4} class system is proposed, which should provide a consistent but still flexible and extensible way to implement simulation models of different types, namely:

Each simulation model is implemented as S4 object (superclass simObj) with the following slots:

simObj model objects should be defined and created using the common S4 mechanisms (new).

In this way, a simObj object may contain all data, which are needed to run simulations simply by entering the model object via source() or data() and then to run and plot the model for example via plot(sim(obj)).

Accessor functions (with names identical to the slot names) are provided to get or set model parameters, time steps, initial values, inputs, the solver, the main and sub-equations or initfunc or to extract the model outputs. It is also possible to modify the components of the simecol objects directly, e.g. the model equations of a model lv with lv@main, but there is no guarantee that this will work in a compatible way in future versions.

Models of different type are provided as data and some more in source code (see directory examples).

The examples are intended as a starting point to write your own simObj objects and to distribute them to whomever you wish.

The package is supplemented with several utility functions (e.g. seedfill or neighbours), which can be used independently from simObj objects.

The following are sources of information on simecol:
Home page u <- "http://hhbio.wasser.tu-dresden.de/projects/simecol/"; browseURL(u)
News file.show(system.file("NEWS", package = "simecol"))
Wish List file.show(system.file("WISHLIST", package = "simecol"))
Acknowledgements file.show(system.file("THANKS", package = "simecol"))
This File package?simecol
Help files as PDF u <- "http://cran.r-project.org/doc/packages/simecol.pdf"; browseURL(u)

Author(s)

Thomas Petzoldt thomas.petzoldt@tu-dresden.de

References

Petzoldt, T, K. Rinke (2007), simecol: An Object-Oriented Framework for Ecological Modeling in textbf{R}. Journal of Statistical Software, submitted.

Examples

    ## -- binary examples -------------------------------
    data(lv)        # load basic Lotka-Volterra model

    ## Not run: fixParms(lv)
    parms(lv)
    main(lv)
    lv <- sim(lv)
    plot(lv)
    results <- out(lv)

    data(conway)    # Conway's game of life
    init(conway) <- matrix(0, 10, 10)
    ## Not run: fixInit(conway) # enter some "1"
    sim(conway, animate=TRUE, delay=10)
    
    ## -- sourcecode examples ----------------------------
    ## open the directory with all sourcecode examples
    ## Not run: 
    browseURL(paste(system.file(package="simecol"), "/examples", sep=""))
    
## End(Not run)

[Package simecol version 0.5-2 Index]