https://github.com/cran/aster
Tip revision: aa47935123bfca8a22cbc8345d658d0c1713a289 authored by Charles J. Geyer on 14 December 2023, 15:20:02 UTC
version 1.1-3
version 1.1-3
Tip revision: aa47935
reaster1.Rout.save
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: i686-pc-linux-gnu (32-bit)
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(aster)
Loading required package: trust
>
> data(radish)
>
> options(digits=4) # avoid rounding differences
>
> pred <- c(0,1,2)
> fam <- c(1,3,2)
>
> rout <- reaster(resp ~ varb + fit : (Site * Region), ~ 0 + fit : Block,
+ pred, fam, varb, id, root, data = radish)
> srout1a <- summary(rout)
> srout1b <- summary(rout, stand = FALSE)
>
> foo <- new.env(parent = emptyenv())
> bar <- suppressWarnings(try(load("reaster1.rda", foo), silent = TRUE))
> if (inherits(bar, "try-error")) {
+ save(srout1a, srout1b, file = "reaster1.rda")
+ } else {
+ srout1a$object$iterations <- NULL
+ srout1b$object$iterations <- NULL
+ foo$srout1a$object$iterations <- NULL
+ foo$srout1b$object$iterations <- NULL
+ print(all.equal(srout1a, foo$srout1a, tol = 1e-4))
+ print(all.equal(srout1b, foo$srout1b, tol = 1e-4))
+ }
[1] TRUE
[1] TRUE
>
>
> proc.time()
user system elapsed
2.752 0.036 2.832