R Under development (unstable) (2024-04-23 r86473 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(epigrowthfit) > options(warn = 2L, error = if (interactive()) recover) > > o.2 <- egf_cache("egf-2.rds") computing a Hessian matrix ... computing a Hessian matrix ... > nms <- c("beta", "theta", "b") > > > ## object ############################################################## > > o.2c <- coef(o.2, random = TRUE) > o.2c.e <- structure(as.double(o.2c), + len = c(beta = 2L, theta = 2L, b = 40L), + map = list(beta = NULL, theta = c(1L, 2L, NA), b = NULL), + class = "coef.egf") > stopifnot(identical(o.2c, o.2c.e)) > > > ## print ############################################################### > > vv <- withVisible(print(o.2c)) beta beta theta theta b b -3.10311755 6.42721459 -1.79201534 -0.56685809 -0.59279576 0.12022154 b b b b b b -0.73984082 -0.21830228 0.65420857 -1.23075773 1.04189983 -0.43572373 b b b b b b -0.13138401 -0.92817953 0.27140046 -1.32151717 -0.68686799 -1.49778693 b b b b b b -0.21594208 -1.02836446 -0.44008433 -0.45215250 -0.45694203 -0.62660402 b b b b b b 0.64146636 1.75115488 0.65667882 1.36907332 0.50463209 0.65624489 b b b b b b 1.70208514 1.50944790 0.23078312 0.58900493 -0.19751288 -0.06937314 b b b b b b -0.49636287 -0.22618172 -0.34614308 0.58402472 -1.00809601 1.14565468 b b 0.55412319 0.06316734 > stopifnot(exprs = { + identical(vv[["value"]], o.2c) + identical(vv[["visible"]], FALSE) + }) > > > ## as.list ############################################################# > > o.2cl <- as.list(o.2c) > o.2cl.e <- split(o.2c, factor(labels(o.2c), levels = nms)) > for (s in nms) + attr(o.2cl.e[[s]], "map") <- attr(o.2c, "map")[[s]] > stopifnot(identical(o.2cl, o.2cl.e)) > > proc.time() user system elapsed 5.26 0.31 5.54