R Under development (unstable) (2024-02-17 r85935 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. > require("tframePlus") Loading required package: tframePlus Loading required package: tframe > require("tfplot") Loading required package: tfplot > if(!require("xts")) stop("xts not available, tests failed.") Loading required package: xts Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric > > > Sys.info() sysname release version nodename machine "Windows" "Server x64" "build 20348" "CRANWIN3" "x86-64" login user effective_user "CRAN" "CRAN" "CRAN" > > #x11() > # postscript(file="lite.out.ps", paper="letter", horizontal=F, onefile=T) > # # width=6, height=8, pointsize=10, > > > all.ok <- TRUE > cat("tframe xts test 1 ... ") tframe xts test 1 ... > z <- xts(rnorm(100), + as.POSIXct(Sys.time() + sort(round(runif(100)*1e8)), "GMT")) > seriesNames(z) <- "random example" > ok <- all(seriesNames(z) == c("random example")) > all.ok <- all.ok & ok > if (ok) cat("ok\n") else cat("unvariate seriesNames failed!\n") ok > ok <- is.tframed(z) & (inherits(z, "xts")) > all.ok <- ok > if (ok) cat("ok\n") else cat("failed!\n") ok > > > cat("tframe xts test 2 ... ") tframe xts test 2 ... > plot(z) > tfplot(z) > all.ok <- all.ok & ok > if (ok) cat("ok\n") else cat("failed!\n") ok > > cat("tframe xts test 3 ... ") tframe xts test 3 ... > y <- rnorm(100) > tframe(y) <- tframe(z) > ok <- is.tframed(y) & (inherits(y, "xts")) & (start(y) == start(z)) > all.ok <- all.ok & ok > if (ok) cat("ok\n") else cat("failed!\n") ok > > cat("tframe xts test 4 ... ") tframe xts test 4 ... > ok <- all(tframe(y) == tframe(z)) > all.ok <- all.ok & ok > if (ok) cat("ok\n") else cat("failed!\n") ok > > > cat("tframe xts test 5 ... ") tframe xts test 5 ... > # irregular series at random observation times > z <- tbind(z, xts(rnorm(120), + as.POSIXct(Sys.time() + sort(round(runif(120)*1e8)), "GMT"))) > seriesNames(z) <- c("random 1", "random 2") > ok <- all(seriesNames(z) == c("random 1", "random 2")) > all.ok <- all.ok & ok > if (ok) cat("ok\n") else cat("multivariate seriesNames failed!\n") ok > # Tobs(z) will be 220 except in the random case of two equal time stamps > y <- rnorm(Tobs(z)) > tframe(y) <- tframe(z) > ok <- all(tframe(y) == tframe(z)) > all.ok <- all.ok & ok > if (ok) cat("ok\n") else cat("failed!\n") ok > > cat("tframe xts test 6... ") tframe xts test 6... > #plot(z) only univariate series > tfplot(z) > ok <- is.tframed(z) & (inherits(z, "xts")) > all.ok <- all.ok & ok > if (ok) cat("ok\n") else cat("failed!\n") ok > > cat("tframe xts test 7 ... ") tframe xts test 7 ... > y <- rnorm(Tobs(z)) > tframe(y) <- tframe(z) > ok <- is.tframed(y) & (inherits(y, "xts")) & (start(y) == start(z)) > all.ok <- all.ok & ok > if (ok) cat("ok\n") else cat("failed!\n") ok > > cat("tframe xts test 8 ... ") tframe xts test 8 ... > ok <- all(tframe(y) == tframe(z)) > all.ok <- all.ok & ok > if (ok) cat("ok\n") else cat("failed!\n") ok > > > cat("All tframe xts tests completed") All tframe xts tests completed> if (all.ok) cat(" OK\n") else cat(", some FAILED!\n") OK > > > proc.time() user system elapsed 0.60 0.12 0.71