R Under development (unstable) (2024-10-11 r87227 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.

> ## * load packages
> library(testthat)
> library(BuyseTest)
Loading required package: Rcpp
BuyseTest version 3.0.5
> 
> library(lava)

Attaching package: 'lava'

The following object is masked from 'package:testthat':

    compare

> library(data.table)
> library(survival)

Attaching package: 'survival'

The following object is masked from 'package:BuyseTest':

    brier

> xx <- capture.output(print(veteran))
> library(riskRegression)
riskRegression version 2023.12.21
> library(prodlim)
> library(mvtnorm)
> 
> ## * run tests
> ## setwd("~/Documents/GitHub/BuyseTest/tests/")
> ## source("~/Documents/GitHub/BuyseTest/tests/testthat/test-BuyseTest-engine.R")
> test_check("BuyseTest")
       Generalized pairwise comparisons with 2 prioritized endpoints and 2 strata

 - statistic       : win odds  (delta: endpoint specific, Delta: global) 
 - null hypothesis : Delta == 1 
 - confidence level: 0.95 
 - inference       : H-projection of order 2 after log transformation 
 - treatment groups: T (treatment) vs. C (control) 
 - strata weights  : 50%, 50% 
 - neutral pairs   : re-analyzed using lower priority endpoints
 - results
  endpoint threshold strata total(%) favorable(%) unfavorable(%) neutral(%)
 eventtime       0.1 global   100.00        37.27          41.73      21.01
                          0    50.00        16.81          21.75      11.44
                          1    50.00        20.46          19.97       9.57
     score         3 global    21.01         0.56           0.25      20.20
                          0    11.44         0.35           0.12      10.97
                          1     9.57         0.21           0.12       9.23
 uninf(%)  delta  Delta CI [2.5% ; 97.5%] p.value 
        0 0.9146 0.9146   [0.6482;1.2906] 0.61138 
        0 0.8199                                  
        0 1.0197                                  
        0 1.0303 0.9204   [0.6521;1.2991] 0.63695 
        0 1.0403                                  
        0 1.0185                                  
       Generalized pairwise comparisons with 2 prioritized endpoints and 2 strata

 - statistic       : net treatment benefit  (delta: endpoint specific, Delta: global) 
 - null hypothesis : Delta == 0 
 - confidence level: 0.95 
 - inference       : H-projection of order 2 after atanh transformation 
 - treatment groups: T (treatment) vs. C (control) 
 - strata weights  : 50%, 50% 
 - neutral pairs   : re-analyzed using lower priority endpoints
 - results
  endpoint threshold strata total(%) favorable(%) unfavorable(%) neutral(%)
 eventtime       0.1 global   100.00        37.27          41.73      21.01
                          0    50.00        16.81          21.75      11.44
                          1    50.00        20.46          19.97       9.57
     score         3 global    21.01         0.56           0.25      20.20
                          0    11.44         0.35           0.12      10.97
                          1     9.57         0.21           0.12       9.23
 uninf(%)   delta   Delta CI [2.5% ; 97.5%] p.value 
        0 -0.0446 -0.0446  [-0.2135;0.1268] 0.61137 
        0 -0.0990                                   
        0  0.0098                                   
        0  0.0031 -0.0415  [-0.2106;0.1301] 0.63694 
        0  0.0045                                   
        0  0.0018                                   
[ FAIL 0 | WARN 6 | SKIP 1 | PASS 1166 ]

══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-BuyseTest-previousBug.R:553:1'

[ FAIL 0 | WARN 6 | SKIP 1 | PASS 1166 ]
> 
> ## * memory check
> ## /data/gannet/ripley/R/packages/tests-clang-SAN/BuyseTest/src/FCT_buyseTest.cpp:894:20
> 
> ## ** valgrind
> ## Information: https://kevinushey.github.io/blog/2015/04/05/debugging-with-valgrind/
> 
> ## R -d "valgrind --tool=memcheck --leak-check=full --track-origins=yes" --vanilla < testthat.R
> ## R -d "valgrind --dsymutil=yes" -e "Rcpp::sourceCpp('segfault.cpp')"
> ## R -d valgrind
> 
> ## ** san
> ## docker run --rm -ti -v $(pwd):/mydir wch1/r-debug
> ## wget -O - https://github.com/bozenne/BuyseTest/tarball/master | tar xz
> ## cd bozenne
> ## cd test/testthat
> ## RDcsan
> ## install.packages(c("Rcpp","RcppArmadillo","devtools","riskRegrssion","cvAUC"))
> ## devtools::install_github("bozenne/BuyseTest")
> ## allFiles <- list.files()
> ## lapply(rev(allFiles), function(x){cat(x,"\n"); source(x)})
> ## gctorture(TRUE)
> ##
> 
> 
> 
> 
> proc.time()
   user  system elapsed 
  34.57    1.20   35.76