getvars: Extract Variables for Model Fitting from a Data Frame

Description Usage Arguments Value Author(s) See Also Examples

Description

Extracts the variables occurring in a formula, in raw form (as get\_all\_vars) or in transformed form (as model.frame does it).

Usage

1
getvars(formula, x = NULL, data = NULL, rawvars = TRUE, jitterbinary = TRUE, ...)

Arguments

formula

a model 'formula' or 'terms' object or an R object.

x
data

a data.frame, list or environment (or object coercible by 'as.data.frame' to a data.frame), containing the variables in 'formula'. Neither a matrix nor an array will be accepted.

rawvars

logical. If TRUE, untransformed variables will be extracted, otherwise, variables as transformed in formula.

jitterbinary

logical. Should binary variables be marked to be jittered in plots?

...

further arguments such as data, weight, subset, offset used to create further columns in the resulting data.frame, with parenthesised names such as '"(offset)"'

Value

data.frame containing the extracted variables.

attr(.,"is.fac") characterizes the variables coming from formula: 0 for numeric, 1 for factor, 2 for binary

Author(s)

WSt

See Also

model.frame

Examples

1
2
data(d.blast)
getvars(log10(tremor)~log10(distance)*log10(charge), data=d.blast)

regr0 documentation built on May 2, 2019, 4:52 p.m.

Related to getvars in regr0...