Extract 1d smooth objects in tidy data format.

tidy_smooth(
  x,
  keep = c("x", "fit", "se", "xlab", "ylab"),
  ci = TRUE,
  conf_level = 0.95,
  ...
)

Arguments

x

a fitted gam object as produced by gam().

keep

A vector of variables to keep.

ci

A logical value indicating whether confidence intervals should be calculated and returned. Defaults to TRUE.

conf_level

Numeric scalar in (0, 1). Confidence level used for the returned confidence intervals when ci = TRUE. Defaults to 0.95.

...

Further arguments passed to plot.gam