R Under development (unstable) (2024-11-21 r87360 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. > if (!requireNamespace("adaptivetau")) + q("no") Loading required namespace: adaptivetau > > library(fastbeta) > options(warn = 2L, error = if (interactive()) utils::recover) > > utils::data(seir.ts02, package = "fastbeta") > a <- attributes(seir.ts02) > m <- a[["m"]] > n <- a[["n"]] > p <- m + n + 2L > > series <- cbind(seir.ts02[, c("Z.obs", "B")], mu = a[["mu"]](0)) > colnames(series) <- c("Z.obs", "B", "mu") > > args <- c(list(series = series), + a[c("sigma", "gamma", "delta", "m", "n", "init", "prob", "delay")]) > X <- do.call(fastbeta, args) > str(X) Time-Series [1:261, 1:5] from 0 to 260: 51848 51985 52117 52222 52318 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:5] "S" "E" "I" "R" ... > > stopifnot(exprs = { + is.double(X) + stats::is.mts(X) + identical(dim(X), c(nrow(seir.ts02), p + 1L)) + identical(dimnames(X), list(NULL, rep.int(c("S", "E", "I", "R", "beta"), c(1L, m, n, 1L, 1L)))) + identical(stats::tsp(X), stats::tsp(seir.ts02)) + !anyNA(X[-length(X)]) + min(0, X, na.rm = TRUE) >= 0 + }) > > if (grDevices::dev.interactive(TRUE)) + plot(X) > > proc.time() user system elapsed 3.23 0.09 3.31