Running '1.R' [160s]
  Running '2.R' [166s]
  Running '3.R' [173s]
  Running '4.R' [1s]
  Running '5.R' [158s]
Running the tests in 'tests/1.R' failed.
Complete output:
  > #require(RUnit)
  > 
  > test.regularVectors <- function()
  + {
  +   require(OPI)
  +   data("RtDbUnits")
  +   checkTrue(chooseOpi("SimHensonRT"), 'RT Henson sim is chosen')
  +   checkEquals(NULL, opiClose())
  +   
  +   #xs <- list([3,2], [-20,-20])
  + 
  +   xs <- c(3, 2, -20, 0, 10,5, -5, -50, -20, 0, 10,5, -5, -50) #, 3, 2,
  +   x_mat <- matrix(xs, 2)
  +   ys <- c(0, -70, -20, 0, 14,2, -23, -30, -20, 0, 10,5, -5, -50) #3, 2,
  +   y_mat <- matrix(ys, 2)
  +   pointsTested = length(y_mat[1,])
  +   
  +   SPEED = 3;
  +   LEVEL = dbTocd(0,10000)
  +   
  +   for (i in 1:pointsTested) {
  +     stim <- list(path=list(x=x_mat[,i], y=y_mat[,i]),sizes=(0.43), colors=("white"),  levels=(LEVEL), speeds=c(SPEED))
  +     class(stim) <- "opiKineticStimulus"
  +     
  +     opiInitialize(type="C", A=NA, B=NA, cap=6, display=NULL, maxStim=10000/pi, rtData=RtDbUnits, rtFP=1:1600)
  +     result <- opiPresent(stim, tt= list(c(30,30,30,30,30)), #list(seq(0, 30, length=10)),
  +                          fpr=0, fnr=0)
  +     
  +     checkTrue(result$seen)
  +   
  +     if (stim$path[1]$x[1]>stim$path[1]$x[2]){
  +       checkTrue(result$x <= stim$path[1]$x[1])
  +       checkTrue(result$x >= stim$path[1]$x[2], paste0("result$x should be greater than path. result$x = ", result$x, " stim$path[1]$x[2] = ",stim$path[1]$x[2]) )#, " path val = ", stim$path[1]$x[2]) )
  +     }
  +     else {
  +       checkTrue(result$x >= stim$path[1]$x[1])
  +       checkTrue(result$x <= stim$path[1]$x[2])
  +     }
  +     
  +     if (stim$path[2]$y[1]>stim$path[2]$y[2]){
  +       checkTrue(result$y <= stim$path[2]$y[1])
  +       checkTrue(result$y >= stim$path[2]$y[2])
  +     }
  +     else {
  +       checkTrue(result$y >= stim$path[2]$y[1])
  +       checkTrue(result$y <= stim$path[2]$y[2])
  +     }
  +   }
  + 
  + }
  > 
  > proc.time()
     user  system elapsed 
     0.15    0.07    0.20 
Running the tests in 'tests/2.R' failed.
Complete output:
  > #require(RUnit)
  > 
  >   #check for an unseen stimulus (below threshold)
  > 
  > test.unseen_stims <- function()
  + {
  +   require(OPI)
  +   data("RtDbUnits")
  +   checkTrue(chooseOpi("SimHensonRT"), 'RT Henson sim is chosen')
  +   
  +   xs <- c(3, 2, -20, 0, 10,5, -5, -50, -20, 0, 10,5, -5, -50) #, 3, 2,
  +   x_mat <- matrix(xs, 2)
  +   ys <- c(0, -70, -20, 0, 14,2, -23, -30, -20, 0, 10,5, -5, -50) #3, 2,
  +   y_mat <- matrix(ys, 2)
  +   pointsTested = length(y_mat[1,])
  + 
  +   SPEED = 3;
  +   LEVEL = dbTocd(50,10000)
  + 
  +   for (i in 1:pointsTested) {
  +     stim <- list(path=list(x=x_mat[,i], y=y_mat[,i]),sizes=(0.43), colors=("white"),  levels=(LEVEL), speeds=c(SPEED))
  +     class(stim) <- "opiKineticStimulus"
  +     
  +     e <- opiInitialize(type="C", A=NA, B=NA, cap=6, display=NULL, maxStim=10000/pi, rtData=RtDbUnits, rtFP=1:1600)
  +     checkEquals(NULL, e)
  + 
  +     result <- opiPresent(stim, tt= list(c(0,0,0,0,0)), fpr=0, fnr=0)
  + 
  +     checkTrue(!result$seen)
  + 
  +     checkEquals(NULL, opiClose())
  +   }
  + 
  + }
  > 
  > proc.time()
     user  system elapsed 
      0.1     0.1     0.2 
Running the tests in 'tests/3.R' failed.
Complete output:
  > #
  > # Check FP=100% and FN=100%
  > #
  > 
  > test.false_positive <- function() { 
  +     r <- check_falsies(1,0) 
  +     checkTrue(r, "fpr set to 1 so stim should be seen")
  + }
  > 
  > test.false_negative <- function() { 
  +     r <- check_falsies(0,1) 
  +     checkTrue(!r, "fnr set to 1 so stim should not be seen")
  + }
  > 
  > 
  > 
  > ################################################
  > # Given the two false repsonse rates, 
  > # return seen/not-seen
  > ################################################
  > check_falsies <- function(fpr=0,fnr=0)
  + {
  +   require(OPI)
  +   data("RtDbUnits")
  +   checkTrue(chooseOpi("SimHensonRT"), 'RT Henson sim is chosen')
  + 
  +   e <- opiInitialize(type="C", A=NA, B=NA, cap=6, display=NULL, maxStim=10000/pi, rtData=RtDbUnits, rtFP=1:1600)
  +   checkEquals(NULL, e)
  +   
  +   SPEED = 3;
  + 
  +   LEVEL = dbTocd(0,10000)
  + 
  +   stim <- list(path=list(x=c(20,10), y=c(-5,32)),sizes=(0.43), colors=("white"),  levels=(LEVEL), speeds=c(SPEED))
  +   class(stim) <- "opiKineticStimulus"
  + 
  +   result <- opiPresent(stim, tt= list(c(30,30,30,30,30)), fpr=fpr, fnr=fnr)
  + 
  +   checkEquals(NULL, opiClose())
  + 
  +   return(result$seen)
  + }
  > 
  > proc.time()
     user  system elapsed 
     0.10    0.15    0.20 
Running the tests in 'tests/5.R' failed.
Complete output:
  > ##################################
  > # Check that Speeds are consistent
  > # A vector with low speed should have stop before vetor with hi speed, cet par.
  > ##################################
  > 
  > require(OPI)
  Loading required package: OPI
  Loading required package: Rfast
  Loading required package: Rcpp
  Loading required package: RcppZiggurat
  Loading required package: RcppParallel
  
  Attaching package: 'RcppParallel'
  
  The following object is masked from 'package:Rcpp':
  
      LdFlags
  
  
  Rfast: 2.1.0
   ___ __ __ __ __    __ __ __ __ __ _             _               __ __ __ __ __     __ __ __ __ __ __   
  |  __ __ __ __  |  |  __ __ __ __ _/            / \             |  __ __ __ __ /   /__ __ _   _ __ __\  
  | |           | |  | |                         / _ \            | |                        / /          
  | |           | |  | |                        / / \ \           | |                       / /          
  | |           | |  | |                       / /   \ \          | |                      / /          
  | |__ __ __ __| |  | |__ __ __ __           / /     \ \         | |__ __ __ __ _        / /__/\          
  |    __ __ __ __|  |  __ __ __ __|         / /__ _ __\ \        |_ __ __ __ _   |      / ___  /           
  |   \              | |                    / _ _ _ _ _ _ \                     | |      \/  / /       
  | |\ \             | |                   / /           \ \                    | |         / /          
  | | \ \            | |                  / /             \ \                   | |        / /          
  | |  \ \           | |                 / /               \ \                  | |       / /          
  | |   \ \__ __ _   | |                / /                 \ \     _ __ __ __ _| |      / /          
  |_|    \__ __ __\  |_|               /_/                   \_\   /_ __ __ __ ___|      \/             team
  Loading required package: abind
  Loading required package: openssl
  Linking to: OpenSSL 3.1.2 1 Aug 2023
  > chooseOpi("SimHensonRT")
  [1] TRUE
  > 
  > rtData <- as.data.frame(cbind(Rt=rep(0, 100),Dist=rep(0, 100), Person=rep(0, 100)))
  > 
  > e <- opiInitialize(type="C", A=NA, B=NA, cap=6, display=NA, maxStim=10000/pi, rtData=rtData, rtFP=1:1600)
  > 
  > get_mean_dist<- function(speed)
  + {
  +   LEVEL = dbTocd(20,10000)
  + 
  +   stim <- list(path=list(x=c(20,0), y=c(20,0)),sizes=(0.43), colors=("white"),  levels=(LEVEL), speeds=c(speed))
  +   class(stim) <- "opiKineticStimulus"
  + 
  +   result <- opiPresent(stim, tt= list(c(0,40)), fpr=0, fnr=0)
  + 
  +   return(sqrt((result$x - 20)^2 + (result$y-20)^2))
  + }
  > 
  > 
  > test.speed <- function()
  + {
  +   
  +   d1 <- median(replicate(100, get_mean_dist(1)))
  +   d5 <- median(replicate(100, get_mean_dist(5)))
  + 
  +   checkTrue(d1 < d5, "d1 (speed 1) should be less than d5 (speed 5)")
  + }
  > 
  > proc.time()
     user  system elapsed 
     0.35    0.12    0.46