Running ‘test.ISOpureS1.model_optimize.kappa_vv_omega_functions.R’ [0s/1s]
  Running ‘test.ISOpureS1.model_optimize.mm_functions.R’ [0s/1s]
  Running ‘test.ISOpureS1.model_optimize.theta_functions.R’ [0s/1s]
  Running ‘test.ISOpureS2.model_optimize.cc_functions.R’ [0s/1s]
  Running ‘test.ISOpureS2.model_optimize.kappa_vv_functions.R’ [0s/1s]
  Running ‘test.ISOpureS2.model_optimize.theta_functions.R’ [0s/1s]
Running the tests in ‘tests/test.ISOpureS2.model_optimize.theta_functions.R’ failed.
Complete output:
  > # test.ISOpureS2.model_optimize.theta_functions.R #################################################
  > # Testing script for functions needed in the optimilzation of mm in Step 2
  > # Test theta separately since it takes a while...
  > #
  > # The functions are of the form ISOpureS2.model_optimize.---
  > # (theta)
  > #   theta_loglikelihood
  > #   theta_deriv_loglikelihood
  > 
  > # LOAD DATA #######################################################################################
  > # load library 
  > library(ISOpureR);
  > 
  > # load the data from that path
  > data.path <-  paste0(file.path(system.file(package = "ISOpureR"), 'extdata', 'Beer'));  
  > load(file.path(data.path , 'beer.tumordata.250.transcripts.30.patients.RData'));
  > load(file.path(data.path, 'beer.ISOpureS2model.250.transcripts.30.patients.RData'));
  > 
  > # the normaldata and tumourdata should be matrices
  > beer.tumordata <- as.matrix(beer.tumordata);
  > 
  > # TEST THETA FUNCTIONS ############################################################################
  > 
  > # inputs needed for theta functions
  > # initial value of theta (this is testing just patient 1)
  > ww <- t(ISOpureS2model$theta_weights[1, ,drop=F])
  > 
  > # test theta functions (just for patient 1, that's the third entry)
  > ISOpureS2.model_optimize.theta.theta_loglikelihood(ww, beer.tumordata, 1, ISOpureS2model);
  [1] 1499714
  > ISOpureS2.model_optimize.theta.theta_deriv_loglikelihood(ww, beer.tumordata, 1, ISOpureS2model);
  Error in if (is.finite(deriv_loglikelihood) == FALSE) { : 
    the condition has length > 1
  Calls: ISOpureS2.model_optimize.theta.theta_deriv_loglikelihood
  Execution halted