Description Usage Arguments Examples
This function creates a linear model of a formula from a data frame and a list of factor variables.
1 | linear_model(f, d, contrasts = NULL)
|
f |
the model to which data will be fit (a formula) |
d |
the data frame containing data to be fit (a data frame) |
contrasts |
a list of variable names to be used as factor variables |
1 2 3 4 5 6 | library(palmerpenguins)
data("penguins")
penguinsform <- bill_length_mm ~ body_mass_g
penguinsdf <- (as.data.frame(penguins))
penguinscont <- list(Species = "contr.sum")
linear_model(penguinsform, d=penguinsdf, contrasts=penguinscont)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.