Running examples in ‘BacArena-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: HeatMapFeeding
> ### Title: Function for plotting heatmap of feeding between two selected
> ###   cell models
> ### Aliases: HeatMapFeeding HeatMapFeeding,Eval-method
> 
> ### ** Examples
> 
> sim <- sihumi_test
> HeatMapFeeding(object = sim, speciesA = 1, speciesB = 2, var_nr = 78)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
BacArena
 --- call from context --- 
BacArena::findFeeding3(object, time = t, mets = A$sub[1:var_nr], 
    plot = F)
 --- call from argument --- 
if (class(interact) == "character") {
    interact = t(as.matrix(interact))
}
 --- R stacktrace ---
where 1: BacArena::findFeeding3(object, time = t, mets = A$sub[1:var_nr], 
    plot = F)
where 2: BacArena::findFeeding3(object, time = t, mets = A$sub[1:var_nr], 
    plot = F)
where 3: HeatMapFeeding(object = sim, speciesA = 1, speciesB = 2, var_nr = 78)
where 4: HeatMapFeeding(object = sim, speciesA = 1, speciesB = 2, var_nr = 78)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
Method Definition:

function (object, time, mets, plot = TRUE, cutoff = 1e-06) 
{
    mets = intersect(object@mediac, as.character(mets))
    time = time + 1
    mflux = object@mfluxlist[[time]]
    mfluxmat = do.call(cbind, lapply(mflux, function(x) {
        return(ifelse(is.na(x[mets]), 0, x[mets]))
    }))
    rownames(mfluxmat) = mets
    inter = data.frame()
    for (i in seq_along(rownames(mfluxmat))) {
        x = mfluxmat[i, ]
        interact = matrix(0, ncol = 2, nrow = 1)
        for (j in names(which(x < -cutoff))) {
            if (length(which(x > cutoff)) != 0) {
                interact = rbind(interact, cbind(names(which(x > 
                  cutoff)), j))
            }
        }
        if (!is.null(interact) & nrow(interact) > 1) {
            interact = interact[-1, , drop = FALSE]
            flux <- sapply(1:nrow(interact), function(k) {
                idx.flux <- match(interact[k, ], colnames(mfluxmat))
                mfluxmat[i, idx.flux]
            })
            if (class(interact) == "character") {
                interact = t(as.matrix(interact))
            }
            inter = rbind(inter, data.frame(prod = interact[, 
                1], cons = interact[, 2], met = rownames(mfluxmat)[i], 
                sim_step = time - 1, prod.flux = flux[1, ], cons.flux = flux[2, 
                  ]))
        }
    }
    if (any(dim(inter) == 0)) {
        warning(paste("sim_step", (time - 1), ":", "No crossfeeding found. Try other metaboites or time points."))
        return(inter)
    }
    inter$met <- factor(inter$met)
    if (plot) {
        g <- igraph::graph.data.frame(inter[, 1:2], directed = TRUE)
        l <- igraph::layout.kamada.kawai(g)
        plot(g, edge.color = grDevices::rainbow(length(levels(inter$met)))[as.numeric(inter$met)], 
            edge.label = round(apply(abs(inter[, c("prod.flux", 
                "cons.flux")]), 1, min), 1), edge.width = 3, 
            edge.arrow.size = 0.8, vertex.color = 1:length(igraph::V(g)), 
            layout = l)
        legend("bottomright", legend = levels(inter$met), col = grDevices::rainbow(length(levels(inter$met))), 
            pch = 19, cex = 0.7)
        return(invisible(list(inter, g)))
    }
    else return(inter)
}
<bytecode: 0x55d9c34151f0>
<environment: namespace:BacArena>

Signatures:
        object
target  "Eval"
defined "Eval"
 --- function search by body ---
S4 Method findFeeding3:BacArena defined in namespace BacArena with signature Eval has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1