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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: fitmix
> ### Title: Mixture Model Distance Detection Function Fitting
> ### Aliases: fitmix
> 
> ### ** Examples
> 
> library(mmds)
> set.seed(0)
> ## simulate some line transect data from a 2 point mixture
> sim.dat<-sim.mix(c(-0.223,-1.897,inv.reparam.pi(0.3)),2,100,1)
> ## fit the model
> fit.sim.dat<-fitmix(sim.dat,1,2)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
mmds
 --- call from context --- 
solvecov(-lt$hessian)
 --- call from argument --- 
if (class(covinv) != "try-error") coll = FALSE else {
    p <- nrow(m)
    cove <- eigen(m, symmetric = TRUE)
    coll <- TRUE
    if (min(cove$values) < 1/cmax) {
        covewi <- diag(p)
        for (i in 1:p) if (cove$values[i] < 1/cmax) 
            covewi[i, i] <- cmax
        else covewi[i, i] <- 1/cove$values[i]
    }
    else covewi <- diag(1/cove$values, nrow = length(cove$values))
    covinv <- cove$vectors %*% covewi %*% t(cove$vectors)
}
 --- R stacktrace ---
where 1: solvecov(-lt$hessian)
where 2: fitmix(sim.dat, 1, 2)

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (m, cmax = 1e+10) 
{
    options(show.error.messages = FALSE)
    covinv <- try(solve(m))
    if (class(covinv) != "try-error") 
        coll = FALSE
    else {
        p <- nrow(m)
        cove <- eigen(m, symmetric = TRUE)
        coll <- TRUE
        if (min(cove$values) < 1/cmax) {
            covewi <- diag(p)
            for (i in 1:p) if (cove$values[i] < 1/cmax) 
                covewi[i, i] <- cmax
            else covewi[i, i] <- 1/cove$values[i]
        }
        else covewi <- diag(1/cove$values, nrow = length(cove$values))
        covinv <- cove$vectors %*% covewi %*% t(cove$vectors)
    }
    options(show.error.messages = TRUE)
    out <- list(inv = covinv, coll = coll)
}
<bytecode: 0x49f0c50>
<environment: namespace:mmds>
 --- function search by body ---
Function solvecov in namespace mmds has this body.
 ----------- END OF FAILURE REPORT -------------- 
Execution halted