- using R Under development (unstable) (2025-01-24 r87627)
- using platform: x86_64-apple-darwin20
- R was compiled by
Apple clang version 14.0.0 (clang-1400.0.29.202)
GNU Fortran (GCC) 14.2.0
- running under: macOS Ventura 13.3.1
- using session charset: UTF-8
- checking for file ‘matrixTests/DESCRIPTION’ ... OK
- this is package ‘matrixTests’ version ‘0.2.3’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... INFO
Package suggested but not available for checking: ‘cosinor2’
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘matrixTests’ can be installed ... [3s/5s] OK
See the install log for details.
- checking installed package size ... OK
- checking package directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [0s/0s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the package can be unloaded cleanly ... [0s/0s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the namespace can be unloaded cleanly ... [0s/0s] OK
- checking loading without being on the library search path ... [0s/0s] OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [5s/9s] OK
- checking Rd files ... [0s/0s] OK
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking examples ... [0s/1s] OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [16s/27s] ERROR
Running ‘andersondarling_behaviour.r’ [0s/0s]
Running ‘andersondarling_correctness.r’ [1s/1s]
Running ‘andersondarling_errors.r’ [0s/0s]
Running ‘andersondarling_warnings.r’ [0s/0s]
Running ‘bartlett_behaviour.r’ [0s/0s]
Running ‘bartlett_correctness.r’ [2s/4s]
Running ‘bartlett_errors.r’ [0s/0s]
Running ‘bartlett_warnings.r’ [0s/0s]
Running ‘brownforsythe_behaviour.r’ [0s/0s]
Running ‘brownforsythe_correctness.r’ [7s/13s]
Running ‘brownforsythe_errors.r’ [0s/0s]
Running ‘brownforsythe_warnings.r’ [0s/0s]
Running ‘cor_pearson_behaviour.r’ [0s/0s]
Running ‘cor_pearson_correctness.r’ [1s/1s]
Running ‘cor_pearson_errors.r’ [0s/0s]
Running ‘cor_pearson_warnings.r’ [0s/0s]
Running ‘cosinor_behaviour.r’ [0s/0s]
Running ‘cosinor_correctness.r’ [1s/2s]
Running the tests in ‘tests/cosinor_correctness.r’ failed.
Complete output:
> library(matrixTests)
>
> #--- functions -----------------------------------------------------------------
>
> cosinor_cosinor <- function(mat, time, per) {
+ stopifnot(ncol(mat) == length(time))
+ if(is.vector(mat)) mat <- matrix(mat, nrow=1)
+ n <- m <- amp <- acr <- dfm <- dfr <- rsq <- f <- p <- numeric(nrow(mat))
+
+ for(i in 1:nrow(mat)) {
+ dat <- data.frame(x=mat[i,], t=time)
+ dat <- dat[!is.na(dat$x) & !is.na(dat$t),]
+ res <- cosinor::cosinor.lm(x ~ time(t), data=dat, period=per)
+
+ n[i] <- nrow(dat)
+ m[i] <- res$coefficients[1]
+ amp[i] <- res$coefficients[2]
+ acr[i] <- abs(cosinor2::correct.acrophase(res) / pi * (per/2))
+ dfm[i] <- cosinor2::cosinor.detect(res)[2]
+ dfr[i] <- cosinor2::cosinor.detect(res)[3]
+ rsq[i] <- cosinor2::cosinor.PR(res)[[2]]
+ f[i] <- cosinor2::cosinor.detect(res)[1]
+ p[i] <- cosinor2::cosinor.detect(res)[4]
+ }
+
+ data.frame(obs=n, mesor=m, amplitude=amp, acrophase=acr, rsquared=rsq,
+ df.model=dfm, df.residual=dfr, statistic=f,
+ pvalue=p, period=per
+ )
+ }
>
>
> #--- montecarlo ----------------------------------------------------------------
>
> # equally spaced 10 time points, period = 10
> X <- matrix(rnorm(10000), ncol=10)
> t <- -5:4
> res1 <- cosinor_cosinor(X, t, 10)
Error in loadNamespace(x) : there is no package called 'cosinor2'
Calls: cosinor_cosinor ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
- checking PDF version of manual ... [6s/10s] OK
- DONE
Status: 1 ERROR
- using check arguments '--no-clean-on-error '