knot_expr | R Documentation |
Non-exported function used to build expressions for the knot sequences to be labeled well on a plot.
knot_expr(x, digits)
x |
a |
digits |
digits to the right of the decimal point to report |
a list
bmat <- bsplines(mtcars$hp, df = 8, bknots = c(50, 350))
ke <- cpr:::knot_expr(bmat, digits = 1)
summary(ke)
plot(x = ke$breaks, y = rep(1, length(ke$breaks)), type = "n")
text(
x = ke$breaks
, y = rep(1, length(ke$breaks))
, labels = parse(text = ke$xi_expr)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.