Nothing
library(cpr)
# testing of the newknots method
################################################################################
# check that the method is not exported
stopifnot(!grepl("newknots", ls("package:cpr")))
cpr_namespace <- ls( getNamespace("cpr"), all.names = TRUE)
stopifnot(sum(cpr_namespace == "newknots") == 1L)
stopifnot(sum(grepl("^newknots$", cpr_namespace)) == 1L)
################################################################################
cp0 <- cp(log(pdg) ~ bsplines(day, iknots = c(-.25, 0, 0.25), bknots = c(-1, 1)), data = spdg)
expected <- log(pdg) ~ bsplines(day, iknots = c(-0.85, 0, 0.25, 0.3), bknots = c(-1, 1))
test <- cpr:::newknots(cp0$call$formula, c(-0.85, 0, 0.25, 0.3))
stopifnot(isTRUE( all.equal(expected, test)))
################################################################################
# End of File #
################################################################################
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.