Error(s) in re-building vignettes:
  ...
--- re-building ‘revdbayes-a-vignette.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
revdbayes
 --- call from context --- 
gev_mle(gum_init, data = data, m = m, sum_gev = sum_gev)
 --- call from argument --- 
if (class(temp$hessian) == "try-error") {
    temp$cov <- temp$se <- NULL
    return(temp)
}
 --- R stacktrace ---
where 1: gev_mle(gum_init, data = data, m = m, sum_gev = sum_gev)
where 2: (function (data, m = length(data[!is.na(data)]), x1 = min(data, 
    na.rm = TRUE), xm = max(data, na.rm = TRUE), sum_gev = sum(data, 
    na.rm = TRUE), xi_eq_zero = FALSE, init_ests = NULL) 
{
    sr <- sqrt(xm - x1)
    theta_to_phi <- function(theta) {
        phi1 <- theta[1]
        phi2 <- (theta[2] + theta[3] * (x1 - theta[1]))/sr
        phi3 <- (theta[2] + theta[3] * (xm - theta[1]))/sr
        c(phi1, phi2, phi3)
    }
    if (!is.null(init_ests)) {
        return(theta_to_phi(init_ests))
    }
    sigma_init <- stats::sd(data) * sqrt(6)/pi
    mu_init <- mean(data) - sigma_init * 0.577215664901532
    gum_init <- c(mu_init, sigma_init, 0)
    if (xi_eq_zero) {
        init <- gum_init
        init_phi <- theta_to_phi(init)
        fish <- gev_fish(gum_init)
        cov_mtx <- solve(fish)/m
        se <- sqrt(diag(cov_mtx))
        row1 <- c(1, 0, 0)
        row2 <- c(-gum_init[3], 1, x1 - gum_init[1])/sr
        row3 <- c(-gum_init[3], 1, xm - gum_init[1])/sr
        mat <- rbind(row1, row2, row3)
        var_phi <- mat %*% cov_mtx %*% t(mat)
        se_phi <- sqrt(diag(var_phi))
        return(list(init = init, se = se, init_phi = init_phi, 
            se_phi = se_phi))
    }
    ests_ok <- ses_ok <- FALSE
    temp <- gev_mle(gum_init, data = data, m = m, sum_gev = sum_gev)
    init <- temp$mle
    if (init[3] > -1 & !is.infinite(temp$nllh)) {
        ests_ok <- TRUE
        if (init[3] > -0.25 & !is.null(temp$cov)) {
            cov_mtx <- temp$cov
            se <- sqrt(diag_pos(cov_mtx))
            row1 <- c(1, 0, 0)
            row2 <- c(-init[3], 1, x1 - init[1])/sr
            row3 <- c(-init[3], 1, xm - init[1])/sr
            mat <- rbind(row1, row2, row3)
            var_phi <- mat %*% cov_mtx %*% t(mat)
            if (all(diag(var_phi) > 0)) {
                se_phi <- sqrt(diag(var_phi))
                ses_ok <- TRUE
            }
        }
    }
    if (!ests_ok | !ses_ok) {
        pwm <- gev_pwm(data)
        se <- pwm$se
        cov_mtx <- pwm$cov
        row1 <- c(1, 0, 0)
        row2 <- c(-pwm$est[3], 1, x1 - pwm$est[1])/sr
        row3 <- c(-pwm$est[3], 1, xm - pwm$est[1])/sr
        mat <- rbind(row1, row2, row3)
        var_phi <- mat %*% cov_mtx %*% t(mat)
        se_phi <- sqrt(diag(var_phi))
        check <- gev_loglik(pars = pwm$est, data = data, m = m, 
            x1 = x1, xm = xm, sum_gev = sum_gev)
        if (!ests_ok & init[3] > -1 & !is.infinite(check)) {
            init <- pwm$est
            ests_ok <- TRUE
        }
    }
    if (!ests_ok) {
        init <- gev_lrs(data)
        check <- gev_loglik(pars = pwm$est, data = data, m = m, 
            x1 = x1, xm = xm, sum_gev = sum_gev)
        if (init[3] > -1 & !is.infinite(check)) {
            ests_ok <- TRUE
        }
    }
    if (!ests_ok) {
        xbar <- sum_gev/m
        mu <- ((m + 1) * xm/m + xbar)/2
        sigma <- ((m + 1) * xm/m - xbar)/2
        init <- c(mu, sigma, -1)
    }
    init_phi <- theta_to_phi(init)
    return(list(init = init, se = se, init_phi = init_phi, se_phi = se_phi))
})(data = c(4.03, 3.83, 3.65, 3.88, 4.01, 4.08, 4.18, 3.8, 4.36, 
3.96, 3.98, 4.69, 3.85, 3.96, 3.85, 3.93, 3.75, 3.63, 3.57, 4.25, 
3.97, 4.05, 4.24, 4.22, 3.73, 4.37, 4.06, 3.71, 3.96, 4.06, 4.55, 
3.79, 3.89, 4.11, 3.85, 3.86, 3.86, 4.21, 4.01, 4.11, 4.24, 3.96, 
4.21, 3.74, 3.85, 3.88, 3.66, 4.11, 3.71, 4.18, 3.9, 3.78, 3.91, 
3.72, 4, 3.66, 3.62, 4.33, 4.55, 3.75, 4.08, 3.9, 3.88, 3.94, 
4.33), m = 65L, x1 = 3.57, xm = 4.69, sum_gev = 258.74)
where 3: do.call(gev_init, ds)
where 4: rpost(n = n, model = "gev", prior = pn, data = portpirie)
where 5: eval(expr, envir, enclos)
where 6: eval(expr, envir, enclos)
where 7: withVisible(eval(expr, envir, enclos))
where 8: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 9: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 10: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 11: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, 
    debug = debug, last = i == length(out), use_try = stop_on_error != 
        2L, keep_warning = keep_warning, keep_message = keep_message, 
    output_handler = output_handler, include_timing = include_timing)
where 12: evaluate::evaluate(...)
where 13: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), 
    keep_message = !isFALSE(options$message), stop_on_error = if (options$error && 
        options$include) 0L else 2L, output_handler = knit_handlers(options$render, 
        options))
where 14: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, 
    keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), 
    stop_on_error = if (options$error && options$include) 0L else 2L, 
    output_handler = knit_handlers(options$render, options)))
where 15: block_exec(params)
where 16: call_block(x)
where 17: process_group.block(group)
where 18: process_group(group)
where 19: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
    error = function(e) {
        setwd(wd)
        cat(res, sep = "\n", file = output %n% "")
        message("Quitting from lines ", paste(current_lines(i), 
            collapse = "-"), " (", knit_concord$get("infile"), 
            ") ")
    })
where 20: process_file(text, output)
where 21: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 22: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 23: vweave_rmarkdown(...)
where 24: engine$weave(file, quiet = quiet, encoding = enc)
where 25: doTryCatch(return(expr), name, parentenv, handler)
where 26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 27: tryCatchList(expr, classes, parentenv, handlers)
where 28: 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)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 29: tools:::.buildOneVignette("revdbayes-a-vignette.Rmd", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/revdbayes.Rcheck/vign_test/revdbayes", 
    TRUE, FALSE, "revdbayes-a-vignette", "UTF-8", "/home/hornik/tmp/scratch/RtmpzieUFS/file6d814dcc538b.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (init, ...) 
{
    x <- stats::optim(init, gev_loglik, ..., control = list(fnscale = -1), 
        hessian = FALSE)
    temp <- list()
    temp$mle <- x$par
    temp$nllh <- -x$value
    temp$hessian <- try(stats::optimHess(temp$mle, gev_loglik, 
        ...), silent = TRUE)
    if (class(temp$hessian) == "try-error") {
        temp$cov <- temp$se <- NULL
        return(temp)
    }
    temp$cov <- try(-solve(temp$hessian), silent = TRUE)
    if (class(temp$cov) == "try-error") {
        temp$cov <- temp$se <- NULL
    }
    else {
        temp$se <- sqrt(diag(temp$cov))
    }
    return(temp)
}
<bytecode: 0x55b9f427c830>
<environment: namespace:revdbayes>
 --- function search by body ---
Function gev_mle in namespace revdbayes has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
--- re-building ‘revdbayes-b-using-rcpp-vignette.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
revdbayes
 --- call from context --- 
gev_mle(gum_init, data = data, m = m, sum_gev = sum_gev)
 --- call from argument --- 
if (class(temp$hessian) == "try-error") {
    temp$cov <- temp$se <- NULL
    return(temp)
}
 --- R stacktrace ---
where 1: gev_mle(gum_init, data = data, m = m, sum_gev = sum_gev)
where 2: (function (data, m = length(data[!is.na(data)]), x1 = min(data, 
    na.rm = TRUE), xm = max(data, na.rm = TRUE), sum_gev = sum(data, 
    na.rm = TRUE), xi_eq_zero = FALSE, init_ests = NULL) 
{
    sr <- sqrt(xm - x1)
    theta_to_phi <- function(theta) {
        phi1 <- theta[1]
        phi2 <- (theta[2] + theta[3] * (x1 - theta[1]))/sr
        phi3 <- (theta[2] + theta[3] * (xm - theta[1]))/sr
        c(phi1, phi2, phi3)
    }
    if (!is.null(init_ests)) {
        return(theta_to_phi(init_ests))
    }
    sigma_init <- stats::sd(data) * sqrt(6)/pi
    mu_init <- mean(data) - sigma_init * 0.577215664901532
    gum_init <- c(mu_init, sigma_init, 0)
    if (xi_eq_zero) {
        init <- gum_init
        init_phi <- theta_to_phi(init)
        fish <- gev_fish(gum_init)
        cov_mtx <- solve(fish)/m
        se <- sqrt(diag(cov_mtx))
        row1 <- c(1, 0, 0)
        row2 <- c(-gum_init[3], 1, x1 - gum_init[1])/sr
        row3 <- c(-gum_init[3], 1, xm - gum_init[1])/sr
        mat <- rbind(row1, row2, row3)
        var_phi <- mat %*% cov_mtx %*% t(mat)
        se_phi <- sqrt(diag(var_phi))
        return(list(init = init, se = se, init_phi = init_phi, 
            se_phi = se_phi))
    }
    ests_ok <- ses_ok <- FALSE
    temp <- gev_mle(gum_init, data = data, m = m, sum_gev = sum_gev)
    init <- temp$mle
    if (init[3] > -1 & !is.infinite(temp$nllh)) {
        ests_ok <- TRUE
        if (init[3] > -0.25 & !is.null(temp$cov)) {
            cov_mtx <- temp$cov
            se <- sqrt(diag_pos(cov_mtx))
            row1 <- c(1, 0, 0)
            row2 <- c(-init[3], 1, x1 - init[1])/sr
            row3 <- c(-init[3], 1, xm - init[1])/sr
            mat <- rbind(row1, row2, row3)
            var_phi <- mat %*% cov_mtx %*% t(mat)
            if (all(diag(var_phi) > 0)) {
                se_phi <- sqrt(diag(var_phi))
                ses_ok <- TRUE
            }
        }
    }
    if (!ests_ok | !ses_ok) {
        pwm <- gev_pwm(data)
        se <- pwm$se
        cov_mtx <- pwm$cov
        row1 <- c(1, 0, 0)
        row2 <- c(-pwm$est[3], 1, x1 - pwm$est[1])/sr
        row3 <- c(-pwm$est[3], 1, xm - pwm$est[1])/sr
        mat <- rbind(row1, row2, row3)
        var_phi <- mat %*% cov_mtx %*% t(mat)
        se_phi <- sqrt(diag(var_phi))
        check <- gev_loglik(pars = pwm$est, data = data, m = m, 
            x1 = x1, xm = xm, sum_gev = sum_gev)
        if (!ests_ok & init[3] > -1 & !is.infinite(check)) {
            init <- pwm$est
            ests_ok <- TRUE
        }
    }
    if (!ests_ok) {
        init <- gev_lrs(data)
        check <- gev_loglik(pars = pwm$est, data = data, m = m, 
            x1 = x1, xm = xm, sum_gev = sum_gev)
        if (init[3] > -1 & !is.infinite(check)) {
            ests_ok <- TRUE
        }
    }
    if (!ests_ok) {
        xbar <- sum_gev/m
        mu <- ((m + 1) * xm/m + xbar)/2
        sigma <- ((m + 1) * xm/m - xbar)/2
        init <- c(mu, sigma, -1)
    }
    init_phi <- theta_to_phi(init)
    return(list(init = init, se = se, init_phi = init_phi, se_phi = se_phi))
})(data = c(4.03, 3.83, 3.65, 3.88, 4.01, 4.08, 4.18, 3.8, 4.36, 
3.96, 3.98, 4.69, 3.85, 3.96, 3.85, 3.93, 3.75, 3.63, 3.57, 4.25, 
3.97, 4.05, 4.24, 4.22, 3.73, 4.37, 4.06, 3.71, 3.96, 4.06, 4.55, 
3.79, 3.89, 4.11, 3.85, 3.86, 3.86, 4.21, 4.01, 4.11, 4.24, 3.96, 
4.21, 3.74, 3.85, 3.88, 3.66, 4.11, 3.71, 4.18, 3.9, 3.78, 3.91, 
3.72, 4, 3.66, 3.62, 4.33, 4.55, 3.75, 4.08, 3.9, 3.88, 3.94, 
4.33), m = 65L, x1 = 3.57, xm = 4.69, sum_gev = 258.74)
where 3: do.call(gev_init, ds)
where 4: rpost_rcpp(n = n, model = "gev", prior = pn, data = portpirie)
where 5 at <text>#8: microbenchmark(rpost = rpost(n = n, model = "gev", prior = pn, 
    data = portpirie), rpost_rcpp = rpost_rcpp(n = n, model = "gev", 
    prior = pn, data = portpirie), evdbayes = posterior(n = n, 
    init = t0, prior = pn, lh = "gev", data = portpirie, psd = s, 
    burn = 0))
where 6: eval(expr, envir, enclos)
where 7: eval(expr, envir, enclos)
where 8: withVisible(eval(expr, envir, enclos))
where 9: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 10: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 11: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 12: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, 
    debug = debug, last = i == length(out), use_try = stop_on_error != 
        2L, keep_warning = keep_warning, keep_message = keep_message, 
    output_handler = output_handler, include_timing = include_timing)
where 13: evaluate::evaluate(...)
where 14: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), 
    keep_message = !isFALSE(options$message), stop_on_error = if (options$error && 
        options$include) 0L else 2L, output_handler = knit_handlers(options$render, 
        options))
where 15: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, 
    keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), 
    stop_on_error = if (options$error && options$include) 0L else 2L, 
    output_handler = knit_handlers(options$render, options)))
where 16: block_exec(params)
where 17: call_block(x)
where 18: process_group.block(group)
where 19: process_group(group)
where 20: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
    error = function(e) {
        setwd(wd)
        cat(res, sep = "\n", file = output %n% "")
        message("Quitting from lines ", paste(current_lines(i), 
            collapse = "-"), " (", knit_concord$get("infile"), 
            ") ")
    })
where 21: process_file(text, output)
where 22: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 23: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 24: vweave_rmarkdown(...)
where 25: engine$weave(file, quiet = quiet, encoding = enc)
where 26: doTryCatch(return(expr), name, parentenv, handler)
where 27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 28: tryCatchList(expr, classes, parentenv, handlers)
where 29: 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)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 30: tools:::.buildOneVignette("revdbayes-b-using-rcpp-vignette.Rmd", 
    "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/revdbayes.Rcheck/vign_test/revdbayes", 
    TRUE, FALSE, "revdbayes-b-using-rcpp-vignette", "UTF-8", 
    "/home/hornik/tmp/scratch/RtmpzieUFS/file6d81178915be.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (init, ...) 
{
    x <- stats::optim(init, gev_loglik, ..., control = list(fnscale = -1), 
        hessian = FALSE)
    temp <- list()
    temp$mle <- x$par
    temp$nllh <- -x$value
    temp$hessian <- try(stats::optimHess(temp$mle, gev_loglik, 
        ...), silent = TRUE)
    if (class(temp$hessian) == "try-error") {
        temp$cov <- temp$se <- NULL
        return(temp)
    }
    temp$cov <- try(-solve(temp$hessian), silent = TRUE)
    if (class(temp$cov) == "try-error") {
        temp$cov <- temp$se <- NULL
    }
    else {
        temp$se <- sqrt(diag(temp$cov))
    }
    return(temp)
}
<bytecode: 0x557f277062f8>
<environment: namespace:revdbayes>
 --- function search by body ---
Function gev_mle in namespace revdbayes has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
--- re-building ‘revdbayes-c-predictive-vignette.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
revdbayes
 --- call from context --- 
gev_mle(gum_init, data = data, m = m, sum_gev = sum_gev)
 --- call from argument --- 
if (class(temp$hessian) == "try-error") {
    temp$cov <- temp$se <- NULL
    return(temp)
}
 --- R stacktrace ---
where 1: gev_mle(gum_init, data = data, m = m, sum_gev = sum_gev)
where 2: (function (data, m = length(data[!is.na(data)]), x1 = min(data, 
    na.rm = TRUE), xm = max(data, na.rm = TRUE), sum_gev = sum(data, 
    na.rm = TRUE), xi_eq_zero = FALSE, init_ests = NULL) 
{
    sr <- sqrt(xm - x1)
    theta_to_phi <- function(theta) {
        phi1 <- theta[1]
        phi2 <- (theta[2] + theta[3] * (x1 - theta[1]))/sr
        phi3 <- (theta[2] + theta[3] * (xm - theta[1]))/sr
        c(phi1, phi2, phi3)
    }
    if (!is.null(init_ests)) {
        return(theta_to_phi(init_ests))
    }
    sigma_init <- stats::sd(data) * sqrt(6)/pi
    mu_init <- mean(data) - sigma_init * 0.577215664901532
    gum_init <- c(mu_init, sigma_init, 0)
    if (xi_eq_zero) {
        init <- gum_init
        init_phi <- theta_to_phi(init)
        fish <- gev_fish(gum_init)
        cov_mtx <- solve(fish)/m
        se <- sqrt(diag(cov_mtx))
        row1 <- c(1, 0, 0)
        row2 <- c(-gum_init[3], 1, x1 - gum_init[1])/sr
        row3 <- c(-gum_init[3], 1, xm - gum_init[1])/sr
        mat <- rbind(row1, row2, row3)
        var_phi <- mat %*% cov_mtx %*% t(mat)
        se_phi <- sqrt(diag(var_phi))
        return(list(init = init, se = se, init_phi = init_phi, 
            se_phi = se_phi))
    }
    ests_ok <- ses_ok <- FALSE
    temp <- gev_mle(gum_init, data = data, m = m, sum_gev = sum_gev)
    init <- temp$mle
    if (init[3] > -1 & !is.infinite(temp$nllh)) {
        ests_ok <- TRUE
        if (init[3] > -0.25 & !is.null(temp$cov)) {
            cov_mtx <- temp$cov
            se <- sqrt(diag_pos(cov_mtx))
            row1 <- c(1, 0, 0)
            row2 <- c(-init[3], 1, x1 - init[1])/sr
            row3 <- c(-init[3], 1, xm - init[1])/sr
            mat <- rbind(row1, row2, row3)
            var_phi <- mat %*% cov_mtx %*% t(mat)
            if (all(diag(var_phi) > 0)) {
                se_phi <- sqrt(diag(var_phi))
                ses_ok <- TRUE
            }
        }
    }
    if (!ests_ok | !ses_ok) {
        pwm <- gev_pwm(data)
        se <- pwm$se
        cov_mtx <- pwm$cov
        row1 <- c(1, 0, 0)
        row2 <- c(-pwm$est[3], 1, x1 - pwm$est[1])/sr
        row3 <- c(-pwm$est[3], 1, xm - pwm$est[1])/sr
        mat <- rbind(row1, row2, row3)
        var_phi <- mat %*% cov_mtx %*% t(mat)
        se_phi <- sqrt(diag(var_phi))
        check <- gev_loglik(pars = pwm$est, data = data, m = m, 
            x1 = x1, xm = xm, sum_gev = sum_gev)
        if (!ests_ok & init[3] > -1 & !is.infinite(check)) {
            init <- pwm$est
            ests_ok <- TRUE
        }
    }
    if (!ests_ok) {
        init <- gev_lrs(data)
        check <- gev_loglik(pars = pwm$est, data = data, m = m, 
            x1 = x1, xm = xm, sum_gev = sum_gev)
        if (init[3] > -1 & !is.infinite(check)) {
            ests_ok <- TRUE
        }
    }
    if (!ests_ok) {
        xbar <- sum_gev/m
        mu <- ((m + 1) * xm/m + xbar)/2
        sigma <- ((m + 1) * xm/m - xbar)/2
        init <- c(mu, sigma, -1)
    }
    init_phi <- theta_to_phi(init)
    return(list(init = init, se = se, init_phi = init_phi, se_phi = se_phi))
})(data = c(4.03, 3.83, 3.65, 3.88, 4.01, 4.08, 4.18, 3.8, 4.36, 
3.96, 3.98, 4.69, 3.85, 3.96, 3.85, 3.93, 3.75, 3.63, 3.57, 4.25, 
3.97, 4.05, 4.24, 4.22, 3.73, 4.37, 4.06, 3.71, 3.96, 4.06, 4.55, 
3.79, 3.89, 4.11, 3.85, 3.86, 3.86, 4.21, 4.01, 4.11, 4.24, 3.96, 
4.21, 3.74, 3.85, 3.88, 3.66, 4.11, 3.71, 4.18, 3.9, 3.78, 3.91, 
3.72, 4, 3.66, 3.62, 4.33, 4.55, 3.75, 4.08, 3.9, 3.88, 3.94, 
4.33), m = 65L, x1 = 3.57, xm = 4.69, sum_gev = 258.74)
where 3: do.call(gev_init, ds)
where 4: rpost(n = n, model = "gev", prior = pn, data = portpirie, nrep = 50)
where 5: eval(expr, envir, enclos)
where 6: eval(expr, envir, enclos)
where 7: withVisible(eval(expr, envir, enclos))
where 8: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 9: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 10: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 11: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, 
    debug = debug, last = i == length(out), use_try = stop_on_error != 
        2L, keep_warning = keep_warning, keep_message = keep_message, 
    output_handler = output_handler, include_timing = include_timing)
where 12: evaluate::evaluate(...)
where 13: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), 
    keep_message = !isFALSE(options$message), stop_on_error = if (options$error && 
        options$include) 0L else 2L, output_handler = knit_handlers(options$render, 
        options))
where 14: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, 
    keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), 
    stop_on_error = if (options$error && options$include) 0L else 2L, 
    output_handler = knit_handlers(options$render, options)))
where 15: block_exec(params)
where 16: call_block(x)
where 17: process_group.block(group)
where 18: process_group(group)
where 19: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
    error = function(e) {
        setwd(wd)
        cat(res, sep = "\n", file = output %n% "")
        message("Quitting from lines ", paste(current_lines(i), 
            collapse = "-"), " (", knit_concord$get("infile"), 
            ") ")
    })
where 20: process_file(text, output)
where 21: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 22: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 23: vweave_rmarkdown(...)
where 24: engine$weave(file, quiet = quiet, encoding = enc)
where 25: doTryCatch(return(expr), name, parentenv, handler)
where 26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 27: tryCatchList(expr, classes, parentenv, handlers)
where 28: 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)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 29: tools:::.buildOneVignette("revdbayes-c-predictive-vignette.Rmd", 
    "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/revdbayes.Rcheck/vign_test/revdbayes", 
    TRUE, FALSE, "revdbayes-c-predictive-vignette", "UTF-8", 
    "/home/hornik/tmp/scratch/RtmpzieUFS/file6d814d157e2a.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (init, ...) 
{
    x <- stats::optim(init, gev_loglik, ..., control = list(fnscale = -1), 
        hessian = FALSE)
    temp <- list()
    temp$mle <- x$par
    temp$nllh <- -x$value
    temp$hessian <- try(stats::optimHess(temp$mle, gev_loglik, 
        ...), silent = TRUE)
    if (class(temp$hessian) == "try-error") {
        temp$cov <- temp$se <- NULL
        return(temp)
    }
    temp$cov <- try(-solve(temp$hessian), silent = TRUE)
    if (class(temp$cov) == "try-error") {
        temp$cov <- temp$se <- NULL
    }
    else {
        temp$se <- sqrt(diag(temp$cov))
    }
    return(temp)
}
<bytecode: 0x56072f8429a8>
<environment: namespace:revdbayes>
 --- function search by body ---
Function gev_mle in namespace revdbayes has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
--- re-building ‘revdbayes-d-kgaps-vignette.Rmd’ using rmarkdown
--- finished re-building ‘revdbayes-d-kgaps-vignette.Rmd’

SUMMARY: processing the following files failed:
  ‘revdbayes-a-vignette.Rmd’ ‘revdbayes-b-using-rcpp-vignette.Rmd’
  ‘revdbayes-c-predictive-vignette.Rmd’

Error: Vignette re-building failed.
Execution halted