View source: R/collect.model.names.R
| collect.model.names | R Documentation |
Either names of all mark model objects (type=NULL) or names of
mark model objects of a specific type (type) are extracted
from a vector of R objects (lx) that was collected from the parent
environment (frame) of the function that calls collect.model.names.
Thus, it is two frames back (parent.frame(2)).
collect.model.names(lx, type = NULL, warning = TRUE)
lx |
vector of R object names from parent.frame(2) |
type |
either NULL (for all types) or a character model type (eg "CJS") |
warning |
if TRUE warning given when models of different types are collected |
If type=NULL then the names of all objects of
class(x)[1]="mark" in lx are returned. If type is
specified, then the names of all objects of class(x)=c("mark",type)
in lx are returned.
This function was written with the intention that it would be called from
other functions ( e.g., collect.models,
run.models) but it will work if called directly (e.g.,
collect.model.names( lx=ls())). While this function returns a vector
of model names, collect.models returns a list of model
objects. The latter can be used to easily create a list of models created
in a function to be used as a return value without listing all the names of
the functions. It uses collect.model.names to perform that function.
model.list: a vector of mark model names
Jeff Laake
collect.models, run.models,
model.table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.