Learn R Programming

insight (version 0.20.4)

find_smooth: Find smooth terms from a model object

Description

Return the names of smooth terms from a model object.

Usage

find_smooth(x, flatten = FALSE)

Value

A character vector with the name(s) of the smooth terms.

Arguments

x

A (gam) model.

flatten

Logical, if TRUE, the values are returned as character vector, not as list. Duplicated values are removed.

Examples

Run this code
data(iris)
model <- mgcv::gam(Petal.Length ~ Petal.Width + s(Sepal.Length), data = iris)
find_smooth(model)

Run the code above in your browser using DataLab