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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: fpc
> ### Title: Construct a FPC regression term
> ### Aliases: fpc
> 
> ### ** Examples
> 
> data(gasoline)
> par(mfrow=c(3,1))
> 
> # Fit PFCR_R
> gasmod1 <- pfr(octane ~ fpc(NIR, ncomp=30), data=gasoline)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
refund
 --- call from context --- 
fpc(NIR, ncomp = 30)
 --- call from argument --- 
if (class(X) == "fd") {
    if (is.null(argvals)) 
        argvals <- argvals <- seq(X$basis$rangeval[1], X$basis$rangeval[2], 
            length = length(X$fdnames[[1]]))
    X <- t(eval.fd(argvals, X))
} else if (is.null(argvals)) argvals <- seq(0, 1, l = ncol(X))
 --- R stacktrace ---
where 1: fpc(NIR, ncomp = 30)
where 2: eval(x, envir = evalenv, enclos = frmlenv)
where 3: eval(x, envir = evalenv, enclos = frmlenv)
where 4: FUN(X[[i]], ...)
where 5: lapply(terms[where.refund], function(x) {
    eval(x, envir = evalenv, enclos = frmlenv)
})
where 6: pfr(octane ~ fpc(NIR, ncomp = 30), data = gasoline)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (X, argvals = NULL, method = c("svd", "fpca.sc", "fpca.face", 
    "fpca.ssvd"), ncomp = NULL, pve = 0.99, penalize = (method == 
    "svd"), bs = "ps", k = 40, ...) 
{
    method <- match.arg(method)
    if (class(X) == "fd") {
        if (is.null(argvals)) 
            argvals <- argvals <- seq(X$basis$rangeval[1], X$basis$rangeval[2], 
                length = length(X$fdnames[[1]]))
        X <- t(eval.fd(argvals, X))
    }
    else if (is.null(argvals)) 
        argvals <- seq(0, 1, l = ncol(X))
    if ("xt" %in% names(list(...))) 
        stop("fpc() does not accept an xt-argument.")
    xt <- call("list", X = substitute(X), method = method, npc = ncomp, 
        pve = pve, penalize = penalize, bs = bs)
    lf(X = X, argvals = argvals, bs = "fpc", k = k, xt = xt, 
        ...)
}
<bytecode: 0xb2e9580>
<environment: namespace:refund>
 --- function search by body ---
Function fpc in namespace refund has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1