extended.model.frame | R Documentation |
This function attempts to apply model.frame
and extend the
result with columns of interactions.
extended.model.frame(formula, data, ..., sep = ".")
formula |
a model formula or terms object or an R object. |
data |
a data.frame, list or environment (see |
... |
further arguments to pass to |
sep |
separator in contraction of names for interactions (default = "."). |
A data.frame
that includes everything a model.frame
does plus interaction terms.
dat <- data.frame(Y = c(1,2,3,4,5,6),
X = factor(LETTERS[c(1,1,2,2,3,3)]),
W = factor(letters[c(1,2,1,2,1,2)]))
extended.model.frame(Y ~ X*W, dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.