sterm | R Documentation |
mgcv
smooth termsThis function defines the names of mgcv
smooth terms based on the type of smooth and the variable name(s). This is useful, for instance, for extracting term-specific predictions from a predict.gam
or predict.bam
object.
sterm(s = "ti", vars = c("hourofday", "julian_day"))
s |
A character vector specifying the type of smooth term (e.g. "s", "te", "ti", "crs", "cr" etc.) |
vars |
A character vector or list specifying variable names. |
Edward Lavender
# Supplying variables as a list:
sterm(s = "s", vars = list("th_interp"))
sterm(s = "ti", vars = list("hourofday", "julian_day"))
# Supplying variables as character vectors:
sterm(s = "s", vars = "th_interp")
sterm(s = "s", vars = c("hourofday", "julian_day"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.