Error(s) in re-building vignettes:
  ...
--- re-building ‘lemarns.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
LeMaRns
 --- call from context --- 
.local(df = df, gdf = gdf, ...)
 --- call from argument --- 
if (class(tau) != "matrix") {
    stop("tau must be a matrix of dimensions nfish and nfish")
}
 --- R stacktrace ---
where 1: .local(df = df, gdf = gdf, ...)
where 2: LeMansParam(species_names = NS_par$species_names, Linf = Linf, 
    k = k, W_a = W_a, W_b = W_b, Lmat = Lmat, tau = NS_tau, recruit_params = list(a = NS_par$a, 
        b = NS_par$b), eta = rep(0.25, 21), L50 = Lmat)
where 3: LeMansParam(species_names = NS_par$species_names, Linf = Linf, 
    k = k, W_a = W_a, W_b = W_b, Lmat = Lmat, tau = NS_tau, recruit_params = list(a = NS_par$a, 
        b = NS_par$b), eta = rep(0.25, 21), L50 = Lmat)
where 4: eval(expr, envir, enclos)
where 5: eval(expr, envir, enclos)
where 6: withVisible(eval(expr, envir, enclos))
where 7: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 8: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 9: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 10: 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 11: evaluate::evaluate(...)
where 12: 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 13: 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 14: block_exec(params)
where 15: call_block(x)
where 16: process_group.block(group)
where 17: process_group(group)
where 18: 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 19: process_file(text, output)
where 20: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 21: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 22: vweave_rmarkdown(...)
where 23: engine$weave(file, quiet = quiet, encoding = enc)
where 24: doTryCatch(return(expr), name, parentenv, handler)
where 25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 26: tryCatchList(expr, classes, parentenv, handlers)
where 27: 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 28: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/LeMaRns.Rcheck/vign_test/LeMaRns", 
    ser_elibs = "/home/hornik/tmp/scratch/RtmpHHAuOZ/file6cda4278700c.rds")

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (df, gdf, nfish = length(Linf), nsc = 32, pred_mu = -2.25, 
    pred_sigma = 0.5, other = 1e+12, bounds = NULL, calc_phi_min = TRUE, 
    phi_min = 0.1, vary_growth = FALSE, growth_eff = 0.5, growth_eff_decay = 0.11, 
    eps = 1e-05, force_mature = TRUE, species_names = paste("species", 
        1:nfish, sep = "_"), Linf, k, W_a, W_b, Lmat, kappa = rep(10, 
        nfish), tau = matrix(1, nfish, nfish), rec_fun = rep("hockey-stick", 
        nfish), recruit_params = list(a = 18.835 - 4.133 * Linf, 
        b = rep(1000/nfish, nfish)), natmort_opt = rep("std_RNM", 
        nfish), Nmort = rep(0.8, nfish), prop = rep(3/4, nfish), 
    curve = rep("logistic", nfish), catch_species = ((0:(length(curve) - 
        1))%%nfish) + 1, max_catchability = rep(1, length(curve)), 
    gear_name = paste("gear_", 1:length(curve), sep = ""), custom = NULL, 
    ...) 
{
    if (pred_sigma <= 0) {
        stop("pred_sigma must take a positive value")
    }
    if (class(tau) != "matrix") {
        stop("tau must be a matrix of dimensions nfish and nfish")
    }
    if (phi_min <= 0) {
        stop("phi_min must take a positive value")
    }
    if (growth_eff <= 0) {
        stop("growth_eff must take a positive value")
    }
    if (any(Nmort <= 0)) {
        warning("Nmort must take a positive value")
    }
    if (any(max_catchability < 0)) {
        warning("max_catchability cannot take a negative value")
    }
    if (length(species_names) < nfish | length(species_names) > 
        nfish) {
        stop("The length of species_names is not equal to nfish")
    }
    if (is.character(species_names) == FALSE) {
        stop("species_names is not a character vector")
    }
    if (length(Linf) < nfish | length(Linf) > nfish) {
        stop("The length of Linf is not equal to nfish")
    }
    if (any(Linf <= 0)) {
        stop("Linf must take a positive value")
    }
    if (is.numeric(Linf) == FALSE) {
        stop("Linf is not a numeric vector")
    }
    if (length(k) < nfish | length(k) > nfish) {
        stop("The length of k is not equal to nfish")
    }
    if (is.numeric(k) == FALSE) {
        stop("k is not a numeric vector")
    }
    if (any(k < 0)) {
        stop("k cannot take a negative value")
    }
    if (length(W_a) < nfish | length(W_a) > nfish) {
        stop("The length of W_a is not equal to nfish")
    }
    if (is.numeric(W_a) == FALSE) {
        stop("W_a is not a numeric value")
    }
    if (any(W_a <= 0)) {
        stop("W_a must take a positive value")
    }
    if (length(W_b) < nfish | length(W_b) > nfish) {
        stop("The length of W_b is not equal to nfish")
    }
    if (is.numeric(W_b) == FALSE) {
        stop("W_b is not a numeric value")
    }
    if (any(W_b <= 0)) {
        warning("W_b must take a positive value")
    }
    if (length(Lmat) < nfish | length(Lmat) > nfish) {
        stop("The length of Lmat is not equal to nfish")
    }
    if (is.numeric(Lmat) == FALSE) {
        stop("Lmat is not a numeric vector")
    }
    if (any(Lmat <= 0)) {
        stop("Lmat must take a positive value")
    }
    if (any(Lmat >= Linf)) {
        warning("Lmat cannot be greater than Linf")
    }
    if (any(kappa <= 0)) {
        stop("kappa must take a positive value")
    }
    if (length(kappa) < nfish | length(kappa) > nfish) {
        stop("The length of kappa is not equal to nfish")
    }
    if (is.numeric(kappa) == FALSE) {
        stop("kappa is not a numeric vector")
    }
    if (is.null(bounds)) {
        maxsize <- max(Linf) * 1.01
        l_bound <- seq(0, maxsize, maxsize/nsc)
        l_bound <- l_bound[-length(l_bound)]
        u_bound <- seq(maxsize/nsc, maxsize, maxsize/nsc)
        mid <- l_bound + (u_bound - l_bound)/2
    }
    else {
        l_bound <- bounds[-length(bounds)]
        u_bound <- bounds[-1]
        mid <- l_bound + (u_bound - l_bound)/2
        nsc <- length(u_bound)
    }
    tmp <- calc_phi(k, Linf, nsc, nfish, u_bound, l_bound, calc_phi_min = calc_phi_min, 
        phi_min = phi_min)
    phi <- tmp$phi
    phi_min <- tmp$phi_min
    tmp <- calc_ration_growthfac(k, Linf, nsc, nfish, l_bound, 
        u_bound, mid, W_a, W_b, phi_min, vary_growth = vary_growth, 
        growth_eff = growth_eff, growth_eff_decay = growth_eff_decay)
    ration <- tmp$ration
    sc_Linf <- tmp$sc_Linf
    wgt <- tmp$wgt
    g_eff <- tmp$g_eff
    mature <- calc_mature(Lmat, nfish, mid, kappa, sc_Linf, eps = eps, 
        force_mature = force_mature)
    stored_rec_funs <- get_rec_fun(rec_fun)
    recruit_params <- do.call("Map", c(c, recruit_params))
    M1 <- calc_M1(nsc, sc_Linf, phi_min, natmort_opt = natmort_opt, 
        Nmort = Nmort, prop = prop)
    prefs <- calc_prefs(pred_mu, pred_sigma, wgt, sc_Linf)
    suit_M2 <- calc_suit_vect(nsc, nfish, sc_Linf, prefs, tau)
    Qs <- calc_Q(curve = curve, species = catch_species, max_catchability = max_catchability, 
        gear_name = gear_name, custom = custom, nsc, nfish, mid, 
        l_bound, u_bound, species_names = species_names, ...)
    new("LeMans_param", nsc = nsc, nfish = nfish, phi_min = phi_min, 
        l_bound = l_bound, u_bound = u_bound, mid = mid, species_names = species_names, 
        Linf = Linf, W_a = W_a, W_b = W_b, k = k, Lmat = Lmat, 
        mature = mature, sc_Linf = sc_Linf, wgt = wgt, phi = phi, 
        ration = ration, other = other, M1 = M1, suit_M2 = suit_M2, 
        Qs = Qs, stored_rec_funs = stored_rec_funs, eps = eps, 
        recruit_params = recruit_params)
}
<environment: namespace:LeMaRns>
 --- function search by body ---
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1