R Under development (unstable) (2024-02-14 r85901 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(cpr) > > acn <- cn(pdg ~ btensor(list(day, age) + , df = list(10, 8) + , bknots = list(c(-1, 1), c(44, 53)) + ) + ttm + , data = spdg) > > cnr0 <- cnr(acn) | | | 0% | |====== | 9% | |============= | 18% | |=================== | 27% | |========================= | 36% | |================================ | 45% | |====================================== | 55% | |============================================= | 64% | |=================================================== | 73% | |========================================================= | 82% | |================================================================ | 91% | |======================================================================| 100% > > s <- summary(cnr0) > > stopifnot(inherits(s, "cpr_summary_cpr_cnr")) > stopifnot(inherits(s, "data.frame")) > > > # print method > printed <- print(cnr0) A list of control nets List of 11 - attr(*, "class")= chr [1:2] "cpr_cnr" "list" > stopifnot(identical(printed, cnr0)) > > printed <- capture.output(print(cnr0)) > stopifnot(identical(length(printed), 3L)) > > ################################################################################ > # End of File # > ################################################################################ > > proc.time() user system elapsed 5.12 0.87 5.98