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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Mqrcm-package
> ### Title: M-Quantile Regression Coefficients Modeling
> ### Aliases: Mqrcm-package
> ### Keywords: package
> 
> ### ** Examples
> 
> 
> # use simulated data
> 
> n <- 250
> x <- rexp(n)
> y <- runif(n, 0, 1 + x)
> model <- iMqr(y ~ x, formula.p = ~ p + I(p^2))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
Mqrcm
 --- call from context --- 
iMqr.newton(theta, V$y, V$X, V$Xw, V$weights, bfun, psi, s, sigma, 
    tol = tol, maxit = maxit, safeit = 2 + sum(s) * (i < 3), 
    eps0 = 0.1)
 --- call from argument --- 
if (!err) {
    if (alg == "gs") {
        alg <- "nr"
        eps <- 1
    }
    delta <- chol2inv(H1) %*% g
} else {
    if (alg == "nr") {
        alg <- "gs"
        eps <- 1
    }
    delta <- g
}
 --- R stacktrace ---
where 1: iMqr.newton(theta, V$y, V$X, V$Xw, V$weights, bfun, psi, s, sigma, 
    tol = tol, maxit = maxit, safeit = 2 + sum(s) * (i < 3), 
    eps0 = 0.1)
where 2: iMqr.internal(mf = mf, cl = cl, formula.p = formula.p, tol = tol, 
    maxit = maxit, s = s, psi = psi, plim = plim)
where 3: iMqr(y ~ x, formula.p = ~p + I(p^2))

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (theta, y, X, Xw, weights, bfun, psi, s, sigma, tol, 
    maxit, safeit, eps0) 
{
    q <- nrow(theta)
    k <- ncol(theta)
    s <- c(s == 1)
    LL <- iobjfun(theta, y, X, Xw, weights, bfun, psi, sigma)
    G <- iobjfun(theta, y, X, Xw, weights, bfun, psi, sigma, 
        LL$u)
    g <- G[s]
    L <- LL$L
    conv <- FALSE
    eps <- eps0
    for (i in 1:safeit) {
        if (conv | max(abs(g)) < tol) {
            break
        }
        u <- rep.int(0, q * k)
        u[s] <- g
        delta <- matrix(u, q, k)
        delta[is.na(delta)] <- 0
        cond <- FALSE
        while (!cond) {
            new.theta <- theta - delta * eps
            if (max(abs(delta * eps)) < tol) {
                conv <- TRUE
                break
            }
            LL1 <- iobjfun(new.theta, y, X, Xw, weights, bfun, 
                psi, sigma)
            cond <- (LL1$L < L)
            eps <- eps * 0.5
        }
        if (conv) {
            break
        }
        theta <- new.theta
        LL <- LL1
        G <- iobjfun(theta, y, X, Xw, weights, bfun, psi, sigma, 
            LL$u)
        g <- G[s]
        L <- LL$L
        eps <- min(eps * 2, 0.1)
    }
    alg <- "nr"
    conv <- FALSE
    eps <- 0.1
    G <- iobjfun(theta, y, X, Xw, weights, bfun, psi, sigma, 
        LL$u, H = TRUE)
    g <- G$G[s]
    h <- G$H[s, s, drop = FALSE]
    for (i in 1:maxit) {
        if (conv | max(abs(g)) < tol) {
            break
        }
        H1 <- try(chol(h), silent = TRUE)
        err <- (class(H1) == "try-error")
        if (!err) {
            if (alg == "gs") {
                alg <- "nr"
                eps <- 1
            }
            delta <- chol2inv(H1) %*% g
        }
        else {
            if (alg == "nr") {
                alg <- "gs"
                eps <- 1
            }
            delta <- g
        }
        u <- rep.int(0, q * k)
        u[s] <- delta
        delta <- matrix(u, q, k)
        delta[is.na(delta)] <- 0
        cond <- FALSE
        while (!cond) {
            new.theta <- theta - delta * eps
            if (max(abs(delta * eps)) < tol) {
                conv <- TRUE
                break
            }
            LL1 <- iobjfun(new.theta, y, X, Xw, weights, bfun, 
                psi, sigma)
            cond <- (LL1$L < L)
            eps <- eps * 0.5
        }
        if (conv) {
            break
        }
        theta <- new.theta
        LL <- LL1
        G <- iobjfun(theta, y, X, Xw, weights, bfun, psi, sigma, 
            LL$u, H = TRUE)
        g <- G$G[s]
        h <- G$H[s, s, drop = FALSE]
        L <- LL$L
        if (i > 1) {
            eps <- min(eps * 10, 1)
        }
        else {
            eps <- min(eps * 10, 0.1)
        }
    }
    list(theta = matrix(theta, q, k), LL = LL, L = L, g = g, 
        h = h, n.it = i, converged = (i < maxit), fullrank = (alg == 
            "nr"))
}
<bytecode: 0x423cee0>
<environment: namespace:Mqrcm>
 --- function search by body ---
Function iMqr.newton in namespace Mqrcm has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1