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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: regmixEM.loc
> ### Title: Iterative Algorithm Using EM Algorithm for Mixtures of
> ###   Regressions with Local Lambda Estimates
> ### Aliases: regmixEM.loc
> ### Keywords: file
> 
> ### ** Examples
> 
> ## Compare a 2-component and 3-component fit to NOdata.
> 
> data(NOdata)
> attach(NOdata)
> set.seed(100)
> out1 <- regmixEM.loc(Equivalence, NO, kernl.h = 2, 
+                      epsilon = 1e-02, verb = TRUE)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
mixtools
 --- call from context --- 
FUN(newX[, i], ...)
 --- call from argument --- 
if (class(A) == "try-error") {
    A = ginv(t(X.mat) %*% (W * X.mat))
}
 --- R stacktrace ---
where 1: FUN(newX[, i], ...)
where 2: apply(matrix(x, ncol = 1), 1, lambda, z = out.EM$post[, i], xi = x, 
    kernel = kern.l, g = kernl.g, h = kernl.h)
where 3: t(apply(matrix(x, ncol = 1), 1, lambda, z = out.EM$post[, i], 
    xi = x, kernel = kern.l, g = kernl.g, h = kernl.h))
where 4: regmixEM.loc(Equivalence, NO, kernl.h = 2, epsilon = 0.01, verb = TRUE)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (z, x, xi, h = NULL, kernel = c("Gaussian", "Beta", 
    "Triangle", "Cosinus", "Optcosinus"), g = 0) 
{
    if (is.null(h)) {
        cat("WARNING! BANDWIDTH MUST BE SPECIFIED!", "\n")
    }
    X.mat = cbind(1, (xi - x))
    kernel <- match.arg(kernel)
    inwindow <- (abs((xi - x)/h) <= 1)
    if (kernel == "Gaussian") {
        W = (kern.G(x, xi, h) * inwindow)
    }
    else if (kernel == "Beta") {
        W = (kern.B(x, xi, h, g) * inwindow)
    }
    else if (kernel == "Triangle") {
        W = (kern.T(x, xi, h) * inwindow)
    }
    else if (kernel == "Cosinus") {
        W = (kern.C(x, xi, h) * inwindow)
    }
    else if (kernel == "Optcosinus") {
        W = (kern.O(x, xi, h) * inwindow)
    }
    A = try(solve(t(X.mat) %*% (W * X.mat)), silent = TRUE)
    if (class(A) == "try-error") {
        A = ginv(t(X.mat) %*% (W * X.mat))
    }
    beta.x = A %*% t(X.mat) %*% (W * z)
    beta.x
}
<bytecode: 0x94048a0>
<environment: namespace:mixtools>
 --- function search by body ---
Function lambda in namespace mixtools has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1