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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: negbin.samp
> ### Title: Estimates sample sizes for desired power using simulation from
> ###   Negative Binomial distribution
> ### Aliases: negbin.samp
> ### Keywords: Negative.Binomial Sample.size
> 
> ### ** Examples
> 
> #--------------------------------------------------
> power = c(0.7,0.8);lambda1=3;k=c(2,3);
> disp=2;alpha=0.1;seed = 20;numsim=100
> sample.negbin <- negbin.samp(power,lambda1,k,disp,alpha,seed,numsim)
Warning in `[.data.frame`(x$env$data, 1L, drop = FALSE) :
  'drop' argument will be ignored
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
RSPS
 --- call from context --- 
(function (power, lambda1, k, disp, alpha, seed, numsim) 
{
    n.temp <- 2
    Power <- 0.001
    while (Power <= power) {
        n = n.temp
        lambda1 = lambda1
        k = k
        disp = disp
        alpha = alpha
        seed = seed
        numsim = numsim
        temp <- negbin.pow(n, lambda1, k, disp, alpha, seed, 
            numsim, monitor = FALSE, sig = sig)
        n.temp <- n.temp + 1
        Power <- max(temp$Power)
    }
    out.samp <- negbin.pow(c(n.temp - 1), lambda1, k, disp, alpha, 
        seed, numsim, monitor = FALSE, sig = sig)
    return(out.samp)
})(power = c(0.7, 0.8, 0.7, 0.8))
 --- call from argument --- 
while (Power <= power) {
    n = n.temp
    lambda1 = lambda1
    k = k
    disp = disp
    alpha = alpha
    seed = seed
    numsim = numsim
    temp <- negbin.pow(n, lambda1, k, disp, alpha, seed, numsim, 
        monitor = FALSE, sig = sig)
    n.temp <- n.temp + 1
    Power <- max(temp$Power)
}
 --- R stacktrace ---
where 1: (function (power, lambda1, k, disp, alpha, seed, numsim) 
{
    n.temp <- 2
    Power <- 0.001
    while (Power <= power) {
        n = n.temp
        lambda1 = lambda1
        k = k
        disp = disp
        alpha = alpha
        seed = seed
        numsim = numsim
        temp <- negbin.pow(n, lambda1, k, disp, alpha, seed, 
            numsim, monitor = FALSE, sig = sig)
        n.temp <- n.temp + 1
        Power <- max(temp$Power)
    }
    out.samp <- negbin.pow(c(n.temp - 1), lambda1, k, disp, alpha, 
        seed, numsim, monitor = FALSE, sig = sig)
    return(out.samp)
})(power = c(0.7, 0.8, 0.7, 0.8))
where 2: do.call(flat, c(args, list(...)))
where 3: .fun(piece, ...)
where 4: (function (i) 
{
    piece <- pieces[[i]]
    if (.inform) {
        res <- try(.fun(piece, ...))
        if (inherits(res, "try-error")) {
            piece <- paste(utils::capture.output(print(piece)), 
                collapse = "\n")
            stop("with piece ", i, ": \n", piece, call. = FALSE)
        }
    }
    else {
        res <- .fun(piece, ...)
    }
    progress$step()
    res
})(1L)
where 5: loop_apply(n, do.ply)
where 6: llply(.data = .data, .fun = .fun, ..., .progress = .progress, 
    .inform = .inform, .parallel = .parallel, .paropts = .paropts)
where 7: ldply(.data = pieces, .fun = .fun, ..., .progress = .progress, 
    .inform = .inform, .parallel = .parallel, .paropts = .paropts, 
    .id = .id)
where 8: adply(.data = .data, .margins = 1, .fun = f, ..., .expand = .expand, 
    .progress = .progress, .inform = .inform, .parallel = .parallel, 
    .paropts = .paropts)
where 9: mdply(store.pow, inner.fcn.pow)
where 10: negbin.samp(power, lambda1, k, disp, alpha, seed, numsim)

 --- value of length: 4 type: logical ---
[1] TRUE TRUE TRUE TRUE
 --- function from context --- 
function (power, lambda1, k, disp, alpha, seed, numsim) 
{
    n.temp <- 2
    Power <- 0.001
    while (Power <= power) {
        n = n.temp
        lambda1 = lambda1
        k = k
        disp = disp
        alpha = alpha
        seed = seed
        numsim = numsim
        temp <- negbin.pow(n, lambda1, k, disp, alpha, seed, 
            numsim, monitor = FALSE, sig = sig)
        n.temp <- n.temp + 1
        Power <- max(temp$Power)
    }
    out.samp <- negbin.pow(c(n.temp - 1), lambda1, k, disp, alpha, 
        seed, numsim, monitor = FALSE, sig = sig)
    return(out.samp)
}
<bytecode: 0x56455c9027f8>
<environment: 0x56455c904900>
 --- function search by body ---
 ----------- END OF FAILURE REPORT -------------- 
Error in while (Power <= power) { : the condition has length > 1
Calls: negbin.samp ... loop_apply -> <Anonymous> -> .fun -> do.call -> <Anonymous>
Execution halted