View source: R/formulas_splines.R
| spline_curves | R Documentation |
Compute one or more tidy spline curves
spline_curves(coefficients, knots = c(0.25, 0.5, 0.75), degree = 3L, n = 1000L)
coefficients |
Numeric vector or matrix with one coefficient column per curve. |
knots, degree, n |
Spline-basis arguments. |
A base data.frame with one row per x/curve combination and columns
x, curve, and value.
head(spline_curves(coefficients = c(0.1, 0.2, 0.5, 0.4, 0.7, 0.6, 0.9),
knots = c(0.25, 0.5, 0.75), degree = 3, n = 20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.