Description Usage Arguments Value Author(s)
View source: R/plot_basis_splines_1d.R
From a one dimensional GAM model produced by mgcv::gam()
, display a ggplot2 based plot of
all the basis spline components that add up to a single smooth parameter.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
gam_model |
A |
data_var |
A string that is the name of one of the data variables in the GAM model. |
show_points |
A logical which if TRUE will plot the observed points. |
title |
A string that sets the plot title. |
subtitle |
A string that sets the plot subtitle. |
center_titles |
A logical which if |
x_limits |
Depending on the class of |
x_major_breaks |
A numeric vector that defines the exact major tic locations along the x axis for all smooth parameters. If not set then the smooth parameter has x axis scaling using ggplot2 defaults. |
y_limits |
A numeric 2 element vector that sets the minimum and maximum for the y axis for the smooth parameter. |
y_major_breaks |
A numeric vector that defines the exact major tic locations along the y axis for the smooth parameter. If not set then the smooth parameter has y axis scaling using ggplot2 defaults. |
line_type |
A string that sets the line type for the basis splines. Typical values are |
line_color |
A string that sets the color of the lines. |
line_width |
A numeric value that sets the width of lines. |
A ggplot2 plot object
Rick Dean
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.