powered by
Return the names of smooth terms from a model object.
find_smooth(x, flatten = FALSE)
A character vector with the name(s) of the smooth terms.
A (gam) model.
Logical, if TRUE, the values are returned as character vector, not as list. Duplicated values are removed.
TRUE
if (require("mgcv")) { data(iris) model <- gam(Petal.Length ~ Petal.Width + s(Sepal.Length), data = iris) find_smooth(model) }
Run the code above in your browser using DataLab