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, ...)
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".
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)))
#>
#> Flashlight lm
#>
#> Model: Yes
#> y: No
#> w: No
#> by: No
#> data dim: No
#> metrics: rmse
#>
#> Flashlight glm
#>
#> Model: Yes
#> y: No
#> w: No
#> by: No
#> data dim: No
#> metrics: rmse