model_name: Name the model

View source: R/model_name.R

model_nameR Documentation

Name the model

Description

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, ...)

Arguments

x

A model.

...

Currently not used.

include_formula

Should the name include the model's formula.

include_call

If TRUE, will return the function call as a name.

Value

A character string of a name (which usually equals the model's class attribute).

Examples


m <- lm(Sepal.Length ~ Petal.Width, data = iris)
model_name(m)
model_name(m, include_formula = TRUE)
model_name(m, include_call = TRUE)

model_name(lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris))


insight documentation built on Nov. 26, 2023, 5:08 p.m.