- using R version 4.6.0 RC (2026-04-21 r89932)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-15 (Debian 15.2.0-16) 15.2.0
GNU Fortran (Debian 15.2.0-16) 15.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
* current time: 2026-04-22 16:48:06 UTC
- checking for file ‘portfolioBacktest/DESCRIPTION’ ... OK
- this is package ‘portfolioBacktest’ version ‘0.4.1’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- 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 serialization versions ... OK
- checking whether package ‘portfolioBacktest’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking ‘build’ 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 ... [2s/4s] OK
- checking whether the package can be loaded with stated dependencies ... [2s/2s] OK
- checking whether the package can be unloaded cleanly ... [2s/2s] OK
- checking whether the namespace can be loaded with stated dependencies ... [2s/2s] OK
- checking whether the namespace can be unloaded cleanly ... [2s/3s] OK
- checking loading without being on the library search path ... [2s/2s] OK
- checking whether startup messages can be suppressed ... [2s/3s] OK
- checking use of S3 registration ... 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 ... [15s/21s] OK
- checking Rd files ... [0s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... 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 contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... [0s/0s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [2s/3s] OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [94s/121s] ERROR
Running ‘testthat.R’ [94s/120s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(portfolioBacktest)
>
> test_check("portfolioBacktest")
Saving _problems/test-portfolioBacktest-73.R
Saving _problems/test-portfolioBacktest-74.R
Saving _problems/test-portfolioBacktest-85.R
Saving _problems/test-portfolioBacktest-86.R
Saving _problems/test-portfolioBacktest-88.R
Saving _problems/test-portfolioBacktest-111.R
Saving _problems/test-portfolioBacktest-112.R
[ FAIL 7 | WARN 2 | SKIP 0 | PASS 61 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-portfolioBacktest.R:73:3'): backtest results coincide with PerformanceAnalytics and base R ──
Expected `ret_portfolioBacktest` to be equivalent to `PerfAnal$returns`.
Numeric: lengths (80, 99) differ
── Failure ('test-portfolioBacktest.R:74:3'): backtest results coincide with PerformanceAnalytics and base R ──
Expected `bt$Uniform$`dataset 1`$w_bop` to be equivalent to `PerfAnal$BOP.Weight`.
Numeric: lengths (160, 198) differ
── Failure ('test-portfolioBacktest.R:85:3'): backtest results coincide with PerformanceAnalytics and base R ──
Expected `ret_portfolioBacktest` to be equivalent to `PerfAnal$returns`.
Numeric: lengths (80, 99) differ
── Failure ('test-portfolioBacktest.R:86:3'): backtest results coincide with PerformanceAnalytics and base R ──
Expected `bt$GMVP$`dataset 1`$w_bop` to be equivalent to `PerfAnal$BOP.Weight[, 1:2]`.
Numeric: lengths (160, 198) differ
── Failure ('test-portfolioBacktest.R:88:3'): backtest results coincide with PerformanceAnalytics and base R ──
Expected `cash` to be equivalent to `as.vector(PerfAnal$BOP.Weight[, 3])`.
Lengths differ: 80 is not 99
── Failure ('test-portfolioBacktest.R:111:3'): backtest results coincide with PerformanceAnalytics and base R ──
Expected `bt_next_period$Uniform$`dataset 1`$return` to be equivalent to `PerfAnal_next_day$returns`.
Numeric: lengths (79, 99) differ
── Failure ('test-portfolioBacktest.R:112:3'): backtest results coincide with PerformanceAnalytics and base R ──
Expected `bt_next_period$Uniform$`dataset 1`$w_bop` to be equivalent to `PerfAnal_next_day$BOP.Weight`.
Numeric: lengths (158, 198) differ
[ FAIL 7 | WARN 2 | SKIP 0 | PASS 61 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [1s/1s] OK
- checking PDF version of manual ... [5s/8s] OK
- checking HTML version of manual ... [3s/5s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 1 ERROR