Running examples in ‘EurosarcBayes-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: bayes_binom_two_postlike
> ### Title: Bayesian, single arm, two endpoint trial designs.
> ### Aliases: bayes_binom_two_postlike
> 
> ### ** Examples
> 
> # modelled toxicity probability
> t=c(0.1,0.1,0.3,0.3)
> # modelled response probability
> r=c(0.35,0.2,0.2,0.35)
> 
> reviews=c(10,15,20,25,30,35,40)
> 
> # uniform prior
> pra=1;prb=1;pta=1;ptb=1
> 
> # End of trial stopping rules for success
> efficacy_critical_value=0.2
> efficacy_prob_stop=0.9
> toxicity_critical_value=0.2
> toxicity_prob_stop=0.8
> 
> # interim required probability to stop
> int_combined_prob=0.99
> int_futility_prob=1
> int_toxicity_prob=1
> int_efficacy_prob=0.99
> 
> # unused in the design for comparison to previous design
> futility_critical_value=0.35
> no_toxicity_critical_value=0.3
> 
> s=bayes_binom_two_postlike(t,r,reviews,pra,prb,pta,ptb,
+ efficacy_critical_value,efficacy_prob_stop,toxicity_critical_value,
+ toxicity_prob_stop,int_combined_prob,int_futility_prob,
+ int_toxicity_prob,int_efficacy_prob,futility_critical_value,
+ no_toxicity_critical_value)
cut-points at each analysis
  patient review low toxicity high toxicity poor outcome good outcome
1             10           NA             5           NA           NA
2             15            0             7            1            8
3             20            1             8            2            9
4             25            2             8            3           11
5             30            3             9            5           12
6             35            5             9            7           12
7             40            9            10           11           12

Frequentist properties of design
                                  Stopping rules T=0.1, R=0.35 T=0.1, R=0.2
1                 Stop early - Futility/Toxicity          7.11        63.61
4 Continue to final analysis - Futility/Toxicity         14.82        27.83
2                          Stop early - Efficacy         54.16         3.25
3          Continue to final analysis - Efficacy         23.90         5.32
6          Expected number of patients recruited         33.51        29.81
  T=0.3, R=0.2 T=0.3, R=0.35
1        91.38         79.37
4         6.36          6.60
2         0.22          2.15
3         2.04         11.88
6        20.30         25.46

Bayesian properties of trial design
  n T>0.3 T>0.2 T>0.3 T>0.2 R>0.2 R>0.35 R>0.2 R>0.35
 10    NA    NA 0.922 0.988    NA     NA    NA     NA
 15 0.003 0.028 0.926 0.993 0.141  0.010 0.999  0.933
 20 0.006 0.058 0.852 0.986 0.179  0.009 0.996  0.838
 25 0.007 0.084 0.627 0.941 0.207  0.007 0.998  0.838
 30 0.007 0.107 0.542 0.925 0.393  0.018 0.996  0.736
 35 0.022 0.246 0.325 0.832 0.566  0.033 0.982  0.493
 40 0.170 0.704 0.275 0.818 0.898  0.176 0.948  0.276

Futility     P(R<0.35)=0.824
Efficacy     P(R>0.2)=0.948

Toxicity ok  P(T<0.3)=0.83
Toxicity     P(T>0.2)=0.818> 
> s
Error in `[[<-.data.frame`(`*tmp*`, i, value = NA_character_) : 
  replacement has 1 row, data has 0
Calls: <Anonymous> ... [<-.data.frame -> xpdrows.data.frame -> [[<- -> [[<-.data.frame
Execution halted