Learn R Programming

pomp (version 1.19)

Example pomp models: Examples of the construction of POMP models

Description

pompExample loads pre-built example pomp objects.

Usage

pompExample(example, …, show = FALSE, envir = .GlobalEnv)

Arguments

example

example to load given as a name or literal character string. Evoked without an argument, pompExample lists all available examples.

additional arguments define symbols in the environment within which the example code is executed.

show

logical; if TRUE, display, but do not execute, the example R code.

envir

the environment into which the objects should be loaded. If envir=NULL, then the created objects are returned in a list.

Value

By default, pompExample has the side effect of creating one or more objects in the global workspace. If envir=NULL, there are no side effects; rather, the objects are returned as a list.

Details

Directories listed in the global option pomp.examples (which can be changed using options()) are searched for file named <example>.R. If found, this file will be sourced in a temporary environment. Additional arguments to pompExample define variables within this environment and will therefore be available when the code in <example>.R is sourced.

The codes that construct these pomp objects can be found in the examples directory in the installed package. Do system.file("examples",package="pomp")) to find this directory.

See Also

blowflies, dacca, gompertz, ou2, ricker, rw2, euler.sir, gillespie.sir, bbs

Examples

Run this code
# NOT RUN {
  pompExample()
  pompExample(euler.sir)
  pompExample("gompertz")
  pompExample(ricker,envir=NULL)
# }
# NOT RUN {
  pompExample(bbs,show=TRUE)
# }

Run the code above in your browser using DataLab