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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: CheckInput.i_CJN
> ### Title: Check the input params of a Closed Jackson Network
> ### Aliases: CheckInput.i_CJN
> ### Keywords: Closed Jackson Network
> 
> ### ** Examples
> 
> ## See example 11.13 in reference [Sixto2004] for more details.
> ## create the nodes
> n <- 2
> n1 <- NewInput.MM1(lambda=0, mu=1/0.2, n=0)
> n2 <- NewInput.MM1(lambda=0, mu=1/0.4, n=0)
> 
> # think time = 0
> z <- 0
> 
> # operational value
> operational <- FALSE
> 
> # definition of the transition probabilities
> prob <- matrix(data=c(0.5, 0.5, 0.5, 0.5), nrow=2, ncol=2, byrow=TRUE)
> 
> cjn1 <- NewInput.CJN(prob, n, z, operational, 0, 0.001, n1, n2)
> 
> CheckInput(cjn1)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
queueing
 --- call from context --- 
CheckInput.i_CJN(cjn1)
 --- call from argument --- 
if (is_prob_a_matrix) {
    if (nrow(x$prob) != ncol(x$prob)) 
        stop(row_distinct_col)
    if (nrow(x$prob) != num_nodes) 
        stop(row_distinct_nodes)
} else {
    if (length(x$prob) != num_nodes) 
        stop(visit_ratios_wrong)
}
 --- R stacktrace ---
where 1: CheckInput.i_CJN(cjn1)
where 2: CheckInput(cjn1)

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (x, ...) 
{
    x_class_CJN <- "x has to be of class i_CJN (Closed Jackson Network)"
    x_anomalous <- "x has some anomalous value. Check the value(s)."
    row_distinct_col <- "x$prob (matrix class) has the number of rows distinct of the number of columns."
    row_distinct_nodes <- "x$prob (matrix class) has distinct number of rows that the number of nodes in x$nodes."
    visit_ratios_wrong <- "x$prob contains a different number of visit ratios than x$nodes."
    n_greater_zero <- "n has to be greater than zero"
    CJN_operational_logical <- "The x$operational parameter has to be of class logical (TRUE or FALSE)"
    CJN_method_values <- "The x$method has to be 0 (exact) or 1 (aprox)"
    CJN_tol_value <- "The x$tol has to be positive"
    if (is.anomalous(x$prob) || is.anomalous(x$nodes) || is.anomalous(x$n) || 
        is.anomalous(x$z) || is.anomalous(x$operational) || is.anomalous(x$method) || 
        is.anomalous(x$tol)) 
        stop(x_anomalous)
    if (class(x) != "i_CJN") 
        stop(x_class_CJN)
    if (x$n <= 0) 
        stop(n_greater_zero)
    num_nodes <- length(x$nodes)
    if (x$method != 0 && x$method != 1) 
        stop(CJN_method_values)
    if (!(x$tol > 0)) 
        stop(CJN_tol_value)
    is_prob_a_matrix <- (class(x$prob) == "matrix")
    if (is_prob_a_matrix) {
        if (nrow(x$prob) != ncol(x$prob)) 
            stop(row_distinct_col)
        if (nrow(x$prob) != num_nodes) 
            stop(row_distinct_nodes)
    }
    else {
        if (length(x$prob) != num_nodes) 
            stop(visit_ratios_wrong)
    }
    if (class(x$operational) != "logical") 
        stop(CJN_operational_logical)
    i <- 1
    while (i <= num_nodes) {
        n = x$nodes[[i]]
        if (x$method == 0) {
            if (class(n) != "i_MM1" && class(n) != "i_MMC" && 
                class(n) != "i_MMInf") 
                stop(paste(paste("Node ", i), "is not of class i_MM1 or i_MMC or i_MMInf!!"))
        }
        else {
            if (class(n) != "i_MM1" && class(n) != "i_MMInf") 
                stop(paste(paste("Node ", i), "is not of class i_MM1 or i_MMInf!!"))
        }
        CheckInput(n)
        i <- i + 1
    }
}
<bytecode: 0x3609ef0>
<environment: namespace:queueing>
 --- function search by body ---
Function CheckInput.i_CJN in namespace queueing has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (is_prob_a_matrix) { : the condition has length > 1
Calls: CheckInput -> CheckInput.i_CJN
Execution halted