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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: lrEM
> ### Title: Log-ratio EM algorithm
> ### Aliases: lrEM
> ### Keywords: ~kwd1 ~kwd2
> 
> ### ** Examples
> 
> # Data set closed to 100 (percentages, common dl = 1%)
> X <- matrix(c(26.91,8.08,12.59,31.58,6.45,14.39,
+               39.73,26.20,0.00,15.22,6.80,12.05,
+               10.76,31.36,7.10,12.74,31.34,6.70,
+               10.85,46.40,31.89,10.86,0.00,0.00,
+               7.57,11.35,30.24,6.39,13.65,30.80,
+               38.09,7.62,23.68,9.70,20.91,0.00,
+               27.67,7.15,13.05,32.04,6.54,13.55,
+               44.41,15.04,7.95,0.00,10.82,21.78,
+               11.50,30.33,6.85,13.92,30.82,6.58,
+               19.04,42.59,0.00,38.37,0.00,0.00),byrow=TRUE,ncol=6)
>               
> X_lrEM <- lrEM(X,label=0,dl=rep(1,6),ini.cov="multRepl")
No. iterations to converge:  16 

> X_roblrEM <- lrEM(X,label=0,dl=rep(1,6),ini.cov="multRepl",rob=TRUE,tolerance=0.001)
No. iterations to converge:  44 

> 
> # Multiple limits of detection by component
> mdl <- matrix(0,ncol=6,nrow=10)
> mdl[2,] <- rep(1,6)
> mdl[4,] <- rep(0.75,6)
> mdl[6,] <- rep(0.5,6)
> mdl[8,] <- rep(0.5,6)
> mdl[10,] <- c(0,0,1,0,0.8,0.7)
> 
> X_lrEM2 <- lrEM(X,label=0,dl=mdl,ini.cov="multRepl")
No. iterations to converge:  17 

> 
> # Non-closed compositional data set
> data(LPdata) # data (ppm/micrograms per gram)
> dl <- c(2,1,0,0,2,0,6,1,0.6,1,1,0,0,632,10) # limits of detection (0 for no limit)
> LPdata2 <- subset(LPdata,select=-c(Cu,Ni,La))  # select a subset for illustration purposes
> dl2 <- dl[-c(5,7,10)]
> 
> LPdata2_lrEM <- lrEM(LPdata2,label=0,dl=dl2)
No. iterations to converge:  5 

> LPdata2_roblrEM <- lrEM(LPdata2,label=0,dl=dl2,rob=TRUE,tolerance=0.005)
Error in tapply(seq_len(nrow(X)), list(misspat = c(1L, 1L, 1L, 1L, 1L,  : 
  arguments must have same length
Calls: lrEM ... by.data.frame -> structure -> eval -> eval -> tapply
Execution halted