Running 'testthat.R' [152s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # MixtComp version 4 - july 2019
  > # Copyright (C) Inria - UniversitÃ© de Lille - CNRS 
  > 
  > # This program is free software: you can redistribute it and/or modify
  > # it under the terms of the GNU Affero General Public License as
  > # published by the Free Software Foundation, either version 3 of the
  > # License, or (at your option) any later version.
  > # This program is distributed in the hope that it will be useful,
  > # but WITHOUT ANY WARRANTY; without even the implied warranty of
  > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  > # GNU Affero General Public License for more details.
  > # 
  > # You should have received a copy of the GNU Affero General Public License
  > # along with this program.  If not, see <https://www.gnu.org/licenses/>
  >  
  > 
  > library(testthat)
  > library(RMixtComp)
  Loading required package: RMixtCompUtilities
  > 
  > test_check("RMixtComp")
  ====== Run Hierarchical MixtComp in  mode with 1 run(s) per number of classes and 1 core(s)
  Data:  individuals and 3 variables.
  -- K = 2
  Number of splits to perform: 1
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Compute criterion
  Run time: 0.05s
  -- K = 3
  Number of splits to perform: 2
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Compute criterion
  Start run 1
  Run 1 DONE 
  Start run 1
  Run 1 DONE 
  Run time: 0.11s
  -- K = 4
  Number of splits to perform: 2
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Compute criterion
  Start run 1
  Run 1 DONE 
  Start run 1
  Run 1 DONE 
  Start run 1
  Run 1 DONE 
  Run time: 0.16s
  You did not provide a model parameter.
  Data are assumed to follow R standard and not MixtComp standard.
  Models will be imputed as follows: "Gaussian" for numeric variable, "Multinomial" for character or factor variable and "Poisson" for integer variable.
  If a variable is named "z_class" and its type is character, factor or integer, it will be used as "LatentClass".
           cont         categ         poiss 
     "Gaussian" "Multinomial"     "Poisson" 
  ====== Run MixtComp in learn mode with 3 run(s) per number of classes and 1 core(s)
  Data: 200 individuals and 3 variables.
  -- K = 2
  Start run 1
  Run 1 DONE 
  Start run 2
  Run 2 DONE 
  Start run 3
  Run 3 DONE 
  Run completed in 0.22s
  Total runtime: 0.22s
  Best model according to BIC: 2 clusters.
  You did not provide a model parameter.
  Data are assumed to follow R standard and not MixtComp standard.
  Models will be imputed as follows: "Gaussian" for numeric variable, "Multinomial" for character or factor variable and "Poisson" for integer variable.
  If a variable is named "z_class" and its type is character, factor or integer, it will be used as "LatentClass".
           cont        categ1        categ2         poiss 
     "Gaussian" "Multinomial" "Multinomial"     "Poisson" 
  ====== Run MixtComp in learn mode with 1 run(s) per number of classes and 1 core(s)
  Data: 200 individuals and 4 variables.
  -- K = 2
  Start run 1
  Run 1 DONE 
  Run completed in 0.06s
  Total runtime: 0.06s
  Best model according to BIC: 2 clusters.
  You did not provide a model parameter.
  Data are assumed to follow R standard and not MixtComp standard.
  Models will be imputed as follows: "Gaussian" for numeric variable, "Multinomial" for character or factor variable and "Poisson" for integer variable.
  If a variable is named "z_class" and its type is character, factor or integer, it will be used as "LatentClass".
           cont         poiss       z_class 
     "Gaussian"     "Poisson" "LatentClass" 
  ====== Run MixtComp in learn mode with 1 run(s) per number of classes and 1 core(s)
  Data: 200 individuals and 3 variables.
  -- K = 2
  Start run 1
  Run 1 DONE 
  Run completed in 0.05s
  Total runtime: 0.05s
  Best model according to BIC: 2 clusters.
  You did not provide a model parameter.
  Data are assumed to follow R standard and not MixtComp standard.
  Models will be imputed as follows: "Gaussian" for numeric variable, "Multinomial" for character or factor variable and "Poisson" for integer variable.
  If a variable is named "z_class" and its type is character, factor or integer, it will be used as "LatentClass".
   Sepal.Length   Sepal.Width  Petal.Length   Petal.Width       z_class 
     "Gaussian"    "Gaussian"    "Gaussian"    "Gaussian" "LatentClass" 
  ====== Run MixtComp in learn mode with 1 run(s) per number of classes and 1 core(s)
  Data: 150 individuals and 5 variables.
  -- K = 3
  Start run 1
  Run 1 DONE 
  Run completed in 0.05s
  Total runtime: 0.05s
  Best model according to BIC: 3 clusters.
  -- 1. Failure: mixtCompLearn works + mixtCompPredict (@test.runWrapper.R#230)  -
  RMixtCompIO:::rand.index(getPartition(resLearn), resGen$z) is not more than 0.9. Difference: -0.155
  
     
        1   2   3   4
    1  16 153  11 214
    2   3   1 639   1
    3 292   0  11   4
    4  11   0 635   9
  ====== Run MixtComp in learn mode with 5 run(s) per number of classes and 1 core(s)
  Data: 1000 individuals and 2 variables.
  -- K = 2
  Start run 1
  Run 1 DONE 
  Start run 2
  Run 2 DONE 
  Start run 3
  Run 3 DONE 
  Start run 4
  Run 4 DONE 
  Start run 5
  Run 5 DONE 
  Run completed in 1.18s
  -- K = 3
  Start run 1
  Run 1 DONE 
  Start run 2
  Run 2 DONE 
  Start run 3
  Run 3 DONE 
  Start run 4
  Run 4 DONE 
  Start run 5
  Run 5 DONE 
  Run completed in 1.86s
  -- K = 4
  Start run 1
  Run 1 DONE 
  Start run 2
  Run 2 DONE 
  Start run 3
  Run 3 DONE 
  Start run 4
  Run 4 DONE 
  Start run 5
  Run 5 DONE 
  Run completed in 1.74s
  -- K = 5
  Start run 1
  Run 1 DONE 
  Start run 2
  Run 2 DONE 
  Start run 3
  Run 3 DONE 
  Start run 4
  Run 4 DONE 
  Start run 5
  Run 5 DONE 
  Run completed in 2.84s
  Total runtime: 7.62s
  Best model according to BIC: 4 clusters.
     
        1   2   3   4
    1   5   2 189   1
    2 286  16   4   3
    3   3   1   7 141
    4   6 330   5   1
  ############### MixtCompLearn Run ###############
  nClass: 2 3 4 5 
  Criterion used: BIC 
              2         3         4         5
  BIC -2475.909 -2332.583 -2289.950 -2296.518
  ICL -2514.214 -2396.713 -2374.129 -2383.235
  Best model: 4 clusters 
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 4 
  Mode: learn 
  Time: 0.312 s
  SEM burn-in iterations done: 75/100 
  SEM run iterations done: 11/100 
  Observed log-likelihood: -2251.957 
  BIC: -2289.95 
  ICL: -2374.129 
  Discriminative power:
  Gaussian1 
      0.913 
  Proportions of the mixture:
  0.302 0.346 0.209 0.143 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1  4.994 0.993
  k: 2  1.987 0.496
  k: 3 -4.984 0.986
  k: 4 -1.926 0.576
  ####################################
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 2 
  Mode: learn 
  Time: 0.241 s
  SEM burn-in iterations done: 46/100 
  SEM run iterations done: 11/100 
  Observed log-likelihood: -2458.639 
  BIC: -2475.909 
  ICL: -2514.214 
  Discriminative power:
  Gaussian1 
      0.902 
  Proportions of the mixture:
  0.345 0.655 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1 -3.755 1.734
  k: 2  3.347 1.774
  ####################################
  $nClass: 2 3 4 5 
  $criterion:  BIC 
  $crit: 
              2         3         4         5
  BIC -2475.909 -2332.583 -2289.950 -2296.518
  ICL -2514.214 -2396.713 -2374.129 -2383.235
  
   Best result
  $algo
  $algo$nInd: 1000 
  $algo$nClass: 4 
  $algo$mode: learn 
  	 Other outputs: nbBurnInIter nbIter nbGibbsBurnInIter nbGibbsIter nSemTry nInitPerClass confidenceLevel ratioStableCriterion nStableCriterion basicMode hierarchicalMode 
  
  $mixture
  $mixture$lnObservedLikelihood: -2251.957 
  $mixture$nbFreeParameters: 11 
  $mixture$BIC: -2289.95 
  $mixture$ICL: -2374.129 
  	 Other outputs: runTime lnCompletedLikelihood IDClass lnProbaGivenClass completedProbabilityLogBurnIn completedProbabilityLogRun delta 
  
  $variable
  $variable$type
  $variable$type$z_class :  LatentClass 
  $variable$type$Gaussian1 :  Gaussian 
  
  $variable$data
  $variable$data$z_class$completed:  3 3 1 4 1 4 ...
  $variable$data$z_class$stat:
        k: 1 k: 2 k: 3 k: 4
  [1,]    0    0    1    0
  [2,]    0    0    1    0
  [3,]    1    0    0    0
  [4,]    0    0    0    1
  [5,]    1    0    0    0
  [6,]    0    0    0    1
  
  	 Other variables: Gaussian1 
  
  $variable$param
  $variable$param$z_class: 
       median q 2.500000% q 97.500000%
  k: 1  0.302   0.3001028    0.3008763
  k: 2  0.346   0.3484070    0.3466407
  k: 3  0.209   0.2106886    0.2093476
  k: 4  0.143   0.1408016    0.1431353
  $variable$param$Gaussian1: 
                   median q 2.500000% q 97.500000%
  k: 1, mean:   4.9938004   4.9322255    5.0645373
  k: 1, sd      0.9932750   0.9308753    1.0167950
  k: 2, mean:   1.9870168   1.9631471    2.0257842
  k: 2, sd      0.4963751   0.4725028    0.5242286
  k: 3, mean:  -4.9843545  -5.0255793   -4.9201798
  k: 3, sd      0.9863619   0.9549541    1.0670384
  k: 4, mean:  -1.9256164  -1.9526482   -1.8870001
  k: 4, sd      0.5764961   0.5334769    0.5914464
  
   $res: results from all MixtComp Run
  $algo
  $algo$nInd: 1000 
  $algo$nClass: 2 
  $algo$mode: learn 
  	 Other outputs: nbBurnInIter nbIter nbGibbsBurnInIter nbGibbsIter nSemTry nInitPerClass confidenceLevel ratioStableCriterion nStableCriterion basicMode hierarchicalMode 
  
  $mixture
  $mixture$lnObservedLikelihood: -2458.639 
  $mixture$nbFreeParameters: 5 
  $mixture$BIC: -2475.909 
  $mixture$ICL: -2514.214 
  	 Other outputs: runTime lnCompletedLikelihood IDClass lnProbaGivenClass completedProbabilityLogBurnIn completedProbabilityLogRun delta 
  
  $variable
  $variable$type
  $variable$type$z_class :  LatentClass 
  $variable$type$Gaussian1 :  Gaussian 
  
  $variable$data
  $variable$data$z_class$completed:  1 1 2 1 2 1 ...
  $variable$data$z_class$stat:
        k: 1 k: 2
  [1,] 1.00 0.00
  [2,] 1.00 0.00
  [3,] 0.00 1.00
  [4,] 0.86 0.14
  [5,] 0.00 1.00
  [6,] 0.73 0.27
  
  	 Other variables: Gaussian1 
  
  $variable$param
  $variable$param$z_class: 
       median q 2.500000% q 97.500000%
  k: 1  0.345   0.3444109     0.346574
  k: 2  0.655   0.6555891     0.653426
  $variable$param$Gaussian1: 
                  median q 2.500000% q 97.500000%
  k: 1, mean:  -3.755153   -3.787398    -3.703540
  k: 1, sd      1.733707    1.691387     1.807558
  k: 2, mean:   3.347495    3.308831     3.376254
  k: 2, sd      1.774473    1.753300     1.793308
  Start run 1
  Run 1 DONE 
  $warnLog
  [1] "Crash."
  
  == testthat results  ===========================================================
  [ OK: 372 | SKIPPED: 2 | WARNINGS: 3 | FAILED: 1 ]
  1. Failure: mixtCompLearn works + mixtCompPredict (@test.runWrapper.R#230) 
  
  Error: testthat unit tests failed
  Execution halted