Running examples in 'gsDesign-Ex.R' failed
The error most likely occurred in:

> ### Name: gsCP
> ### Title: Conditional and Predictive Power, Overall and Conditional
> ###   Probability of Success
> ### Aliases: gsCP gsPP gsPI gsPosterior gsPOS gsCPOS
> ### Keywords: design
> 
> ### ** Examples
> 
> library(ggplot2)
> # set up a group sequential design
> x <- gsDesign(k = 5)
> x
Asymmetric two-sided group sequential design with
90 % power and 2.5 % Type I Error.
Upper bound spending computations assume
trial continues if lower bound is crossed.

           Sample
            Size    ----Lower bounds----  ----Upper bounds-----
  Analysis Ratio*   Z   Nominal p Spend+  Z   Nominal p Spend++
         1  0.220 -0.90    0.1836 0.0077 3.25    0.0006  0.0006
         2  0.441 -0.04    0.4853 0.0115 2.99    0.0014  0.0013
         3  0.661  0.69    0.7563 0.0171 2.69    0.0036  0.0028
         4  0.881  1.36    0.9131 0.0256 2.37    0.0088  0.0063
         5  1.101  2.03    0.9786 0.0381 2.03    0.0214  0.0140
     Total                        0.1000                 0.0250 
+ lower bound beta spending (under H1):
 Hwang-Shih-DeCani spending function with gamma = -2.
++ alpha spending:
 Hwang-Shih-DeCani spending function with gamma = -4.
* Sample size ratio compared to fixed design with no interim

Boundary crossing probabilities and expected sample size
assume any cross stops the trial

Upper boundary (power or Type I Error)
          Analysis
   Theta      1      2      3      4      5  Total   E{N}
  0.0000 0.0006 0.0013 0.0028 0.0062 0.0117 0.0226 0.5726
  3.2415 0.0417 0.1679 0.2806 0.2654 0.1444 0.9000 0.7440

Lower boundary (futility or Type II Error)
          Analysis
   Theta      1      2      3      4      5  Total
  0.0000 0.1836 0.3201 0.2700 0.1477 0.0559 0.9774
  3.2415 0.0077 0.0115 0.0171 0.0256 0.0381 0.1000
> 
> # set up a prior distribution for the treatment effect
> # that is normal with mean .75*x$delta and standard deviation x$delta/2
> mu0 <- .75 * x$delta
> sigma0 <- x$delta / 2
> prior <- normalGrid(mu = mu0, sigma = sigma0)
> 
> # compute POS for the design given the above prior distribution for theta
> gsPOS(x = x, theta = prior$z, wgts = prior$wgts)
Error in methods::is(x, c("gsProbability", "gsDesign")) : 
  length(class2) == 1L is not TRUE
Calls: gsPOS -> <Anonymous> -> stopifnot
Execution halted