Returns the "name" (class attribute) of a model, possibly including further information.
Usage
model_name(x, ...)
# Default S3 method
model_name(x, include_formula = FALSE, include_call = FALSE, ...)
Examples
m <- lm(Sepal.Length ~ Petal.Width, data = iris)
model_name(m)
#> [1] "lm"
model_name(m, include_formula = TRUE)
#> [1] "lm(Sepal.Length ~ Petal.Width)"
model_name(m, include_call = TRUE)
#> [1] "lm(formula = Sepal.Length ~ Petal.Width, data = iris)"
model_name(lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris))
#> [1] "lmerMod"