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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Z_BevertonHolt
> ### Title: Beverton & Holt's Z-Equations
> ### Aliases: Z_BevertonHolt
> ### Keywords: Z function mortality
> 
> ### ** Examples
> 
> # based on length-frequency data
> data(synLFQ2)
> Z_BevertonHolt(synLFQ2, catch_columns = 2, Lprime_tprime = 47.5)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
TropFishR
 --- call from context --- 
Z_BevertonHolt(synLFQ2, catch_columns = 2, Lprime_tprime = 47.5)
 --- call from argument --- 
if (class(catch) == "data.frame" | class(catch) == "matrix") {
    if (is.na(catch_columns[1])) 
        stop("Please provide numbers indicating which column of the catch matrix should be analysed!")
    catchmat <- res$catch[, (catch_columns)]
    if (length(catch_columns) > 1) {
        catch <- rowSums(catchmat, na.rm = TRUE)
    }
    else catch <- catchmat
}
 --- R stacktrace ---
where 1: Z_BevertonHolt(synLFQ2, catch_columns = 2, Lprime_tprime = 47.5)

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (param, catch_columns = NA, Lprime_tprime) 
{
    res <- param
    catch <- res$catch
    if (class(catch) == "data.frame" | class(catch) == "matrix") {
        if (is.na(catch_columns[1])) 
            stop("Please provide numbers indicating which column of the catch matrix should be analysed!")
        catchmat <- res$catch[, (catch_columns)]
        if (length(catch_columns) > 1) {
            catch <- rowSums(catchmat, na.rm = TRUE)
        }
        else catch <- catchmat
    }
    if ("midLengths" %in% names(res)) {
        classes <- as.character(res$midLengths)
        classes.num <- do.call(rbind, strsplit(classes, split = "\\+"))
        classes.num <- as.numeric(classes.num[, 1])
        Lprime_tprime_ind <- which.min(abs(classes.num - Lprime_tprime))
        Linf <- res$Linf
        K <- res$K
        if (class(catch) == "numeric") {
            if (length(classes) != length(catch)) 
                stop("Ages and catch do not have the same length!")
        }
        interval <- (classes.num[2] - classes.num[1])/2
        Lprime_tprime <- Lprime_tprime - interval
        c_midlength <- catch * classes.num
        c_midlength_for_Lmean <- c_midlength[Lprime_tprime_ind:length(c_midlength)]
        catch_for_Lmean <- catch[Lprime_tprime_ind:length(catch)]
        Lmean <- sum(c_midlength_for_Lmean, na.rm = TRUE)/sum(catch_for_Lmean, 
            na.rm = TRUE)
        Z <- K * (Linf - Lmean)/(Lmean - Lprime_tprime)
        ret <- c(res, list(Lmean = Lmean, Lprime = Lprime_tprime, 
            Z = Z))
        return(ret)
    }
    if ("midAge" %in% names(res) | "age" %in% names(res)) {
        if ("midAge" %in% names(res)) 
            classes <- as.character(res$midAge)
        if ("age" %in% names(res)) 
            classes <- as.character(res$age)
        classes.num <- do.call(rbind, strsplit(classes, split = "\\+"))
        classes.num <- as.numeric(classes.num[, 1])
        Lprime_tprime_ind <- which.min(abs(classes.num - Lprime_tprime))
        if (class(catch) == "numeric") {
            if (length(classes) != length(catch)) 
                stop("Ages and catch do not have the same length!")
        }
        interval <- (classes.num[2] - classes.num[1])/2
        Lprime_tprime <- Lprime_tprime - interval
        catch_for_tprime <- catch[Lprime_tprime_ind:length(catch)]
        classes.num_for_tprime <- classes.num[Lprime_tprime_ind:length(classes.num)]
        sample.size <- sum(catch_for_tprime, na.rm = TRUE)
        sum.age.number <- sum((catch_for_tprime * classes.num_for_tprime), 
            na.rm = TRUE)
        tmean <- sum.age.number/sample.size
        Z.BH <- 1/(tmean - Lprime_tprime)
        ret <- c(res, list(tmean = tmean, tprime = Lprime_tprime, 
            Z = Z.BH))
        return(ret)
    }
}
<bytecode: 0x8000398>
<environment: namespace:TropFishR>
 --- function search by body ---
Function Z_BevertonHolt in namespace TropFishR has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(catch) == "data.frame" | class(catch) == "matrix") { : 
  the condition has length > 1
Calls: Z_BevertonHolt
Execution halted