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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: boot.rq
> ### Title: Bootstrapping Quantile Regression
> ### Aliases: boot.rq boot.rq.xy boot.rq.wxy boot.rq.pwy boot.rq.spwy
> ###   boot.rq.mcmb
> ### Keywords: regression
> 
> ### ** Examples
> 
> y <- rnorm(50)
> x <- matrix(rnorm(100),50)
> fit <- rq(y~x,tau = .4)
> summary(fit,se = "boot", bsmethod= "xy")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
quantreg
 --- call from context --- 
boot.rq(x, y, tau, ...)
 --- call from argument --- 
if (class(x) != "matrix.csr") x <- as.matrix(x)
 --- R stacktrace ---
where 1: boot.rq(x, y, tau, ...)
where 2: summary.rq(fit, se = "boot", bsmethod = "xy")
where 3: summary(fit, se = "boot", bsmethod = "xy")

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (x, y, tau = 0.5, R = 200, bsmethod = "xy", mofn = length(y), 
    blbn = NULL, cluster = NULL, U = NULL, ...) 
{
    n <- length(y)
    if (class(x) != "matrix.csr") 
        x <- as.matrix(x)
    p <- ncol(x)
    B <- matrix(0, R, p)
    if (tau <= 0 || tau >= 1) 
        stop("tau outside (0,1) not allowed")
    if (length(cluster)) 
        bsmethod <- "cluster"
    if (bsmethod == "xy") {
        if (!length(U)) {
            if (mofn < p || mofn > n) 
                stop("mofn is out of range")
            U <- matrix(sample(n, mofn * R, replace = TRUE), 
                mofn, R)
        }
        B <- sqrt(mofn/n) * boot.rq.xy(x, y, U, tau)
    }
    else if (bsmethod == "wxy") {
        if (!length(U)) 
            U <- matrix(rexp(n * R, 1), n, R)
        B <- boot.rq.wxy(x, y, U, tau)
    }
    else if (bsmethod == "BLB") {
        b <- length(y)
        if (!length(U)) 
            U <- rmultinom(R, blbn, rep(1/b, b))
        B <- boot.rq.wxy(x, y, U, tau)
    }
    else if (bsmethod == "cluster") {
        if (!length(U)) {
            if (length(cluster) != n) 
                stop("cluster is wrong length")
            u <- unique(cluster)
            m <- length(u)
            h <- c(-(sqrt(5) - 1)/2, (sqrt(5) + 1)/2)
            hp <- c((sqrt(5) + 1)/sqrt(20), (sqrt(5) - 1)/sqrt(20))
            U <- matrix(sample(h, R * m, prob = hp, replace = TRUE), 
                m, R)
            U <- apply(U, 2, function(v) v[match(cluster, u)])
        }
        r <- c(rq.fit(x, y, tau)$resid)
        psi <- (r < 0) - tau
        W <- as.matrix(t(x) %*% (U * psi))
        if (class(x) == "matrix.csr") 
            B <- boot.rq.spwy(W, x, y, tau)
        else B <- boot.rq.pwy(W, x, y, tau)
    }
    else if (bsmethod == "jack") {
        if (!length(U)) {
            if (missing(mofn)) 
                mofn <- n - ceiling(2 * sqrt(n))
            if (mofn < p || mofn > n) 
                stop("mofn is out of range")
            U <- matrix(0, mofn, R)
            U <- apply(U, 2, function(x) sample(n, mofn))
        }
        B <- (mofn - p + 1)/sqrt(n * (n - mofn)) * boot.rq.xy(x, 
            y, U, tau)
    }
    else if (bsmethod == "pwy") {
        if (!length(U)) {
            U <- matrix(runif(n * R), n, R)
        }
        W <- t(x) %*% ((U < tau) - tau)
        B <- boot.rq.pwy(W, x, y, tau)
    }
    else if (bsmethod == "mcmb") {
        B <- boot.rq.mcmb(x, y, tau = tau, R = R)
    }
    else if (bsmethod == "wild") {
        n <- length(y)
        fit <- rq.fit(x, y, tau = tau)
        S <- sample(c(-2 * tau, 2 * (1 - tau)), prob = c(tau, 
            1 - tau), size = n * R, replace = TRUE)
        W <- matrix(S, n, R)
        r <- c(fit$resid)
        f0 <- akj(r, z = 0)$dens
        r <- r + hat(x) * (tau - I(r < 0))/f0
        Y <- c(fitted(fit)) + W * abs(r)
        B <- rqs.fit(x, Y, tau = tau)
    }
    else stop("your chosen bootstrap method is not allowed")
    list(B = B, U = U)
}
<bytecode: 0x5654daf2ced8>
<environment: namespace:quantreg>
 --- function search by body ---
Function boot.rq in namespace quantreg has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1