packList {PBSmodelling}R Documentation

Pack a List with Objects

Description

Pack a list with existing objects using names only.

Usage

packList(stuff, target="PBSlist", value, 
    lenv=parent.frame(), tenv=.GlobalEnv)

Arguments

stuff string vector of object names
target target list object
value an optional explicit value to assign to stuff
lenv local environment where objects are located
tenv target environment where target list is or will be located

Details

A list object called target will be located in the tenv environment. The objects named in stuff and located in the lenv environment will appear as named components within the list object target.

If an explicit value is specified, the function uses this value instead of looking for local objects. Essentially, stuff=value which is then packed into target.

Value

No value is returned

Author(s)

Rowan Haigh, Pacific Biological Station, Nanaimo BC

See Also

unpackList, writeList, readList

Examples

fn = function() {
        alpha=rnorm(10)
        beta=letters
        gamma=mean
        delta=longley
        packList(c("alpha","beta","gamma","delta")) }
fn(); print(PBSlist)

[Package PBSmodelling version 2.06 Index]