knot_expr {cpr} | R Documentation |
Knot Expressions
Description
Non-exported function used to build expressions for the knot sequences to be labeled well on a plot.
Usage
knot_expr(x, digits)
Arguments
x |
a |
digits |
digits to the right of the decimal point to report |
Value
a list
Examples
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)
)
[Package cpr version 0.4.0 Index]