Error(s) in re-building vignettes:
--- re-building ‘mixtools.Rnw’ using Sweave
mixtools package, version 1.1.0, Released 2017-03-10
This package is based upon work supported by the National Science Foundation under Grant No. SES-0518772.

The following object is masked from package:datasets:

    CO2

The following objects are masked from CO2data (pos = 3):

    CO2, GNP, country

The following object is masked from package:datasets:

    CO2

 ----------- 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(CO2, GNP, beta = CO2reg$beta, sigma = CO2reg$sigma, 
    lambda = CO2reg$posterior, kern.l = "Beta", kernl.h = 20, 
    kernl.g = 3)
where 5: eval(expr, .GlobalEnv)
where 6: eval(expr, .GlobalEnv)
where 7: withVisible(eval(expr, .GlobalEnv))
where 8: doTryCatch(return(expr), name, parentenv, handler)
where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 10: tryCatchList(expr, classes, parentenv, handlers)
where 11: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 12: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 13: evalFunc(ce, options)
where 14: tryCatchList(expr, classes, parentenv, handlers)
where 15: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 16: driver$runcode(drobj, chunk, chunkopts)
where 17: utils::Sweave(...)
where 18: engine$weave(file, quiet = quiet, encoding = enc)
where 19: doTryCatch(return(expr), name, parentenv, handler)
where 20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 21: tryCatchList(expr, classes, parentenv, handlers)
where 22: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
    outputs <- c(outputs, output)
}, error = function(e) {
    thisOK <<- FALSE
    fails <<- c(fails, file)
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 23: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-clang/mixtools.Rcheck/vign_test/mixtools", 
    ser_elibs = "/tmp/RtmpzLO0ck/file3e6358ede9ba.rds")

 --- 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: 0x7b1bf50>
<environment: namespace:mixtools>
 --- function search by body ---
Function lambda in namespace mixtools has this body.
 ----------- END OF FAILURE REPORT -------------- 

Error: processing vignette 'mixtools.Rnw' failed with diagnostics:
 chunk 37 (label = CO2igle) 
Error in if (class(A) == "try-error") { : the condition has length > 1

--- failed re-building ‘mixtools.Rnw’

SUMMARY: processing the following file failed:
  ‘mixtools.Rnw’

Error: Vignette re-building failed.
Execution halted