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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: MMEst
> ### Title: MM inference method for variance component mixed models
> ### Aliases: MMEst
> ### Keywords: LMM
> 
> ### ** Examples
> 
> require('MM4LMM')
> 
> #### Example 1: variance component analysis, 1 model
> data(VarianceComponentExample)
> DataHybrid <- VarianceComponentExample$Data
> KinF <- VarianceComponentExample$KinshipF
> KinD <- VarianceComponentExample$KinshipD
> 
> ##Build incidence matrix for each random effect
> Zf <- t(sapply(as.character(DataHybrid$CodeFlint), function(x)
+   as.numeric(rownames(KinF)==x)))
> Zd <- t(sapply(as.character(DataHybrid$CodeDent), function(x)
+   as.numeric(rownames(KinD)==x)))
> 
> ##Build the VarList and ZList objects
> VL = list(Flint=KinF , Dent=KinD , Error = diag(1,nrow(DataHybrid)))
> ZL <- list(Flint=Zf , Dent=Zd , Error = diag(1,nrow(DataHybrid)))
> 
> ##Perform inference
> #A first way to call MMEst
> ResultVA <- MMEst(Y=DataHybrid$Trait  , Cofactor = matrix(DataHybrid$Trial)
+                   , ZList = ZL  ,  VarList = VL)
> length(ResultVA)
[1] 1
> print(ResultVA)
$NullModel
$NullModel$Beta
(Intercept)    V1Trial2 
 17.1477209  -0.3480591 

$NullModel$Sigma2
    Flint      Dent     Error 
0.3602198 1.0465994 1.6575116 

$NullModel$VarBeta
                    [,1]         [,2]
(Intercept)  0.011057997 -0.007724358
V1Trial2    -0.007724358  0.015619924

$NullModel$`LogLik (Reml)`
[1] -387.5173

$NullModel$NbIt
[1] 11

$NullModel$Method
[1] "Reml"

$NullModel$attr
[1] 0 1

$NullModel$Factors
[1] "V1"


> 
> #A second way to call MMEst (same result)
> Formula <- as.formula('~ Trial')
> ResultVA2 <- MMEst(Y=DataHybrid$Trait  , Cofactor = DataHybrid,
+                    formula = Formula
+                   , ZList = ZL  ,  VarList = VL)
Error in MMEst(Y = DataHybrid$Trait, Cofactor = DataHybrid, formula = Formula,  : 
  Incompatible dimension between Y and Cofactor
Execution halted