gg_smooth: Plot smooth 1d terms of gam objects

Description Usage Arguments Value Examples

Description

Given a gam model this convenience function returns a plot of all smooth terms contained in the model. If more than one smooth is present, the different smooth are faceted.

Usage

1

Arguments

data

Any data frame containing variables used to fit the model. Only first row will be used.

fit

A fitted object of class gam.

...

Further arguments passed to get_terms

Value

A ggplot2 object.

Examples

1
2
g1 <- mgcv::gam(Sepal.Length ~ s(Sepal.Width) + s(Petal.Length), data=iris)
gg_smooth(iris, g1, terms=c("Sepal.Width", "Petal.Length"))

adibender/pam documentation built on May 10, 2019, 5:54 a.m.