fmobj: Object Finder

Description Usage Arguments Value Author(s) See Also Examples

View source: R/finterp.r

Description

fmobj inspects a formula and returns a list containing the objects referred to, with indicators as to which are unknown parameters, covariates, factor variables, and functions.

Usage

1
fmobj(z, envir=parent.frame())

Arguments

z

A model formula beginning with ~, either in Wilkinson and Rogers notation or containing unknown parameters.

envir

The environment in which the formula is to be interpreted.

Value

A list, of class fmobj, containing a character vector (objects) with the names of the objects used in a formula, and logical vectors indicating which are unknown parameters (parameters), covariates (covariates), factor variables (factors), and functions (functions).

Author(s)

J.K. Lindsey

See Also

finterp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
x1 <- rpois(20,2)
x2 <- rnorm(20)
x3 <- gl(2,10)
#
# W&R formula
fmobj(~x1+x2+x3)
#
# formula with unknowns
fmobj(~b0+b1*x1+b2*x2)
#
# nonlinear formulae with unknowns
# log link
fmobj(~exp(b0+b1*x1+b2*x2))

rmutil documentation built on May 27, 2018, 5:03 p.m.