Error(s) in re-building vignettes:
  ...
--- re-building 'stmVignette.Rnw' using Sweave
stm v1.3.4 successfully loaded. See ?stm for help. 
 Papers, resources, and other materials at structuraltopicmodel.com
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
stm
 --- call from context --- 
labelTopics(poliblogPrevFit, c(3, 7, 20))
 --- call from argument --- 
if (class(frexlabels) == "try-error") {
    out$frex[[k]] <- "FREX encountered an error and failed to run"
} else {
    out$frex[[k]] <- vocab[frexlabels[1:n, k]]
}
 --- R stacktrace ---
where 1: labelTopics(poliblogPrevFit, c(3, 7, 20))
where 2: eval(expr, .GlobalEnv)
where 3: eval(expr, .GlobalEnv)
where 4: withVisible(eval(expr, .GlobalEnv))
where 5: doTryCatch(return(expr), name, parentenv, handler)
where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 7: tryCatchList(expr, classes, parentenv, handlers)
where 8: 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 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 10: evalFunc(ce, options)
where 11: tryCatchList(expr, classes, parentenv, handlers)
where 12: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 13: driver$runcode(drobj, chunk, chunkopts)
where 14: utils::Sweave(...)
where 15: engine$weave(file, quiet = quiet, encoding = enc)
where 16: doTryCatch(return(expr), name, parentenv, handler)
where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 18: tryCatchList(expr, classes, parentenv, handlers)
where 19: 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 20: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/stm.Rcheck/vign_test/stm", 
    ser_elibs = "/tmp/RtmpKDgriF/file157e41b7fcc2.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (model, topics = NULL, n = 7, frexweight = 0.5) 
{
    if (n < 1) 
        stop("n must be 1 or greater")
    logbeta <- model$beta$logbeta
    K <- model$settings$dim$K
    vocab <- model$vocab
    if (is.null(topics)) 
        topics <- 1:nrow(logbeta[[1]])
    aspect <- length(logbeta) > 1
    out <- list()
    if (!aspect) {
        out$prob <- list()
        out$frex <- list()
        out$lift <- list()
        out$score <- list()
        logbeta <- logbeta[[1]]
        wordcounts <- model$settings$dim$wcounts$x
        frexlabels <- try(calcfrex(logbeta, frexweight, wordcounts), 
            silent = TRUE)
        liftlabels <- try(calclift(logbeta, wordcounts), silent = TRUE)
        scorelabels <- try(calcscore(logbeta), silent = TRUE)
        problabels <- apply(logbeta, 1, order, decreasing = TRUE)
        for (k in 1:K) {
            out$prob[[k]] <- vocab[problabels[1:n, k]]
            if (class(frexlabels) == "try-error") {
                out$frex[[k]] <- "FREX encountered an error and failed to run"
            }
            else {
                out$frex[[k]] <- vocab[frexlabels[1:n, k]]
            }
            if (class(liftlabels) == "try-error") {
                out$lift[[k]] <- "Lift encountered an error and failed to run"
            }
            else {
                out$lift[[k]] <- vocab[liftlabels[1:n, k]]
            }
            if (class(scorelabels) == "try-error") {
                out$lift[[k]] <- "Score encountered an error and failed to run"
            }
            else {
                out$score[[k]] <- vocab[scorelabels[1:n, k]]
            }
        }
        out <- lapply(out, do.call, what = rbind)
    }
    else {
        labs <- lapply(model$beta$kappa$params, function(x) {
            windex <- order(x, decreasing = TRUE)[1:n]
            ifelse(x[windex] > 0.001, vocab[windex], "")
        })
        labs <- do.call(rbind, labs)
        A <- model$settings$dim$A
        anames <- model$settings$covariates$yvarlevels
        i1 <- K + 1
        i2 <- K + A
        intnums <- (i2 + 1):nrow(labs)
        out$topics <- labs[topics, , drop = FALSE]
        out$covariate <- labs[i1:i2, , drop = FALSE]
        rownames(out$covariate) <- anames
        if (model$settings$kappa$interactions) {
            tindx <- rep(1:K, each = A)
            intnums <- intnums[tindx %in% topics]
            out$interaction <- labs[intnums, , drop = FALSE]
        }
    }
    out$topicnums <- topics
    class(out) <- "labelTopics"
    return(out)
}
<bytecode: 0xa46bc00>
<environment: namespace:stm>
 --- function search by body ---
Function labelTopics in namespace stm has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1