SpaDES (version 1.3.1)

objs: Extract or replace an object from the simulation environment

Description

The [[ and $ operators provide "shortcuts" for accessing objects in the simulation environment. I.e., instead of using envir(sim)$object or envir(sim)[["object"]], one can simply use sim$object or sim[["object"]].

Usage

objs(x, ...)

# S4 method for simList objs(x, ...)

objs(x) <- value

# S4 method for simList objs(x) <- value

# S4 method for simList,ANY,ANY [[(x, i, j, ..., drop)

# S4 method for simList,ANY,ANY,ANY [[(x, i) <- value

# S4 method for simList $(x, name)

# S4 method for simList $(x, name) <- value

Arguments

x

A simList object from which to extract element(s) or in which to replace element(s).

...

see i.

value

Any R object.

i

Indices specifying elements to extract or replace.

j

see i.

drop

not implemented.

name

A literal character string or a name.

Value

Returns or sets a list of objects in the simList environment.

Details

objs can take ... arguments passed to ls, allowing, e.g. all.names=TRUE objs<- requires takes a named list of values to be assigned in the simulation envirment.

See Also

SpaDES, specifically the section 1.2.1 on Simulation Parameters.

Other functions to access elements of a simList object: .addDepends, doEvent.checkpoint, envir, events, globals, inputs, ls.simList, ls.str.simList, modules, packages, params, paths, progressInterval, times