find_smooth: Find smooth terms from a model object

View source: R/find_smooth.R

find_smoothR Documentation

Find smooth terms from a model object

Description

Return the names of smooth terms from a model object.

Usage

find_smooth(x, flatten = FALSE)

Arguments

x

A (gam) model.

flatten

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

Value

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

Examples


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


easystats/insight documentation built on Dec. 3, 2024, 5:45 p.m.