View source: R/get.design.matrix.R
get.design.matrix | R Documentation |
Internal scampr function that creates a fixed effect design matrix from a formula and data
get.design.matrix(formula, data, subset, na.action)
formula |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of a model. See GLM function for further formula details. |
data |
a data frame containing predictors and response of the formula parameter. |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The ‘factory-fresh’ default is na.omit. Another possible value is NULL, no action. Value na.exclude can be useful. |
a data.frame
des.mat <- scampr:::get.design.matrix(Petal.Length ~ Petal.Width + Species, iris)
head(des.mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.