View source: R/multiflashlight.R
multiflashlight | R Documentation |
Combines a list of flashlights to an object of class "multiflashlight" and/or updates a multiflashlight.
multiflashlight(x, ...)
## Default S3 method:
multiflashlight(x, ...)
## S3 method for class 'flashlight'
multiflashlight(x, ...)
## S3 method for class 'list'
multiflashlight(x, ...)
## S3 method for class 'multiflashlight'
multiflashlight(x, ...)
x |
An object of class "multiflashlight", "flashlight" or a list of flashlights. |
... |
Optional arguments in the flashlights to update, see examples. |
An object of class "multiflashlight" (a named list of flashlight objects).
multiflashlight(default)
: Used to create a flashlight object.
No x
has to be passed in this case.
multiflashlight(flashlight)
: Updates an existing flashlight object and turns
into a multiflashlight.
multiflashlight(list)
: Creates (and updates) a multiflashlight from a list
of flashlights.
multiflashlight(multiflashlight)
: Updates an object of class "multiflashlight".
flashlight()
fit_lm <- lm(Sepal.Length ~ ., data = iris)
fit_glm <- glm(Sepal.Length ~ ., family = Gamma(link = log), data = iris)
mod_lm <- flashlight(model = fit_lm, label = "lm")
mod_glm <- flashlight(model = fit_glm, label = "glm")
(mods <- multiflashlight(list(mod_lm, mod_glm)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.