get_coef | R Documentation |
Use get_coeff(coeff, clist) to retrieve the value of coeff from clist
get_coef(coef, clist)
coef |
Which coefficient to look up |
clist |
The list of coefficients to use |
Or use function factor make_coef_getter to make it easier to retrieve values from specific lists when you have multiple lists.
Formatted value string for the coefficient
mdl <- lm(mpg ~ cyl * gear, data = mtcars) # Create model coefs <- enlist_coefs(mdl) # Create coefficients get_coef1 <- make_coef_getter(mdl) # Using the model object directly get_coef2 <- make_coef_getter(coefs) # Using the list of coefficients we made # All are equivalent get_coef("cyl:gear", coefs) get_coef1("cyl:gear") get_coef2("cyl:gear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.