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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: fitHighOrderMultivarMC
> ### Title: Function to fit Higher Order Multivariate Markov chain
> ### Aliases: fitHighOrderMultivarMC
> 
> ### ** Examples
> 
> data <- matrix(c('2', '1', '3', '3', '4', '3', '2', '1', '3', '3', '2', '1', 
+                c('2', '4', '4', '4', '4', '2', '3', '3', '1', '4', '3', '3')), 
+                ncol = 2, byrow = FALSE)
>                
> fitHighOrderMultivarMC(data, order = 2, Norm = 2)                
This function is experimental
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
markovchain
 --- call from context --- 
fitHighOrderMultivarMC(data, order = 2, Norm = 2)
 --- call from argument --- 
if (class(seqMat) == "data.frame") {
    seqMat <- as.matrix(seqMat)
}
 --- R stacktrace ---
where 1: fitHighOrderMultivarMC(data, order = 2, Norm = 2)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (seqMat, order = 2, Norm = 2) 
{
    message("This function is experimental")
    if (class(seqMat) == "data.frame") {
        seqMat <- as.matrix(seqMat)
    }
    seqMat <- t(seqMat)
    allTmat <- .allTransMat(seqMat, order = order)
    freqMat <- .allFreqProbMat(seqMat)
    n <- order
    uelement <- sort(unique(as.character(seqMat)))
    m <- length(uelement)
    s <- nrow(seqMat)
    lmbda <- rep(1/(n * s), n * s * s)
    fit <- Rsolnp::solnp(pars = lmbda, fun = .fn3, eqfun = .eqn3, 
        eqB = rep(1, s), LB = rep(0, n * s * s), control = list(trace = 0), 
        allTmat = allTmat, freqMat = freqMat, n = n, m = m, s = s, 
        Norm = Norm)
    return(new("hommc", order = order, Lambda = fit$pars, P = allTmat, 
        states = uelement, byrow = FALSE))
}
<bytecode: 0x7c73828>
<environment: namespace:markovchain>
 --- function search by body ---
Function fitHighOrderMultivarMC in namespace markovchain has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1