Running 'testthat.R' [210s]
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 on thread number 167456
  Run 1 DONE on thread number 167456
   Compute criterion
  Run time: 0.1s
  -- K = 3
  Number of splits to perform: 2
   Split a cluster in two
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
   Split a cluster in two
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
   Compute criterion
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
  Run time: 0.29s
  -- K = 4
  Number of splits to perform: 2
   Split a cluster in two
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
   Split a cluster in two
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
   Compute criterion
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
  Run time: 0.36s
  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 on thread number 167456
  Run 1 DONE on thread number 167456
  Start run 2 on thread number 167456
  Run 2 DONE on thread number 167456
  Start run 3 on thread number 167456
  Run 3 DONE on thread number 167456
  Run completed in 0.26s
  Total runtime: 0.26s
  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 on thread number 167456
  Run 1 DONE on thread number 167456
  Run completed in 0.11s
  Total runtime: 0.11s
  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 on thread number 167456
  Run 1 DONE on thread number 167456
  Run completed in 0.08s
  Total runtime: 0.08s
  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 on thread number 167456
  Run 1 DONE on thread number 167456
  Run completed in 0.09s
  Total runtime: 0.09s
  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 on thread number 167456
  Run 1 DONE on thread number 167456
  Start run 2 on thread number 167456
  Run 2 DONE on thread number 167456
  Start run 3 on thread number 167456
  Run 3 DONE on thread number 167456
  Start run 4 on thread number 167456
  Run 4 DONE on thread number 167456
  Start run 5 on thread number 167456
  Run 5 DONE on thread number 167456
  Run completed in 2.04s
  -- K = 3
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
  Start run 2 on thread number 167456
  Run 2 DONE on thread number 167456
  Start run 3 on thread number 167456
  Run 3 DONE on thread number 167456
  Start run 4 on thread number 167456
  Run 4 DONE on thread number 167456
  Start run 5 on thread number 167456
  Run 5 DONE on thread number 167456
  Run completed in 2.47s
  -- K = 4
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
  Start run 2 on thread number 167456
  Run 2 DONE on thread number 167456
  Start run 3 on thread number 167456
  Run 3 DONE on thread number 167456
  Start run 4 on thread number 167456
  Run 4 DONE on thread number 167456
  Start run 5 on thread number 167456
  Run 5 DONE on thread number 167456
  Run completed in 3.38s
  -- K = 5
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
  Start run 2 on thread number 167456
  Run 2 DONE on thread number 167456
  Start run 3 on thread number 167456
  Run 3 DONE on thread number 167456
  Start run 4 on thread number 167456
  Run 4 DONE on thread number 167456
  Start run 5 on thread number 167456
  Run 5 DONE on thread number 167456
  Run completed in 5.37s
  Total runtime: 13.26s
  Best model according to BIC: 4 clusters.
     
        1   2   3   4
    1   3   2   1 191
    2 290  16   0   3
    3   1   1 142   8
    4   8 326   2   6
  ############### MixtCompLearn Run ###############
  nClass: 2 3 4 5 
  Criterion used: BIC 
              2         3         4         5
  BIC -2475.894 -2332.494 -2289.798 -2294.729
  ICL -2512.664 -2396.033 -2376.578 -2378.986
  Best model: 4 clusters 
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 4 
  Mode: learn 
  Time: 0.538 s
  SEM burn-in iterations done: 100/100 
  SEM run iterations done: 100/100 
  Observed log-likelihood: -2251.805 
  BIC: -2289.798 
  ICL: -2376.578 
  Discriminative power:
  Gaussian1 
      0.913 
  Proportions of the mixture:
  0.307 0.34 0.148 0.205 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1  4.987 0.997
  k: 2  1.992 0.491
  k: 3 -1.936 0.574
  k: 4 -4.985 0.973
  ####################################
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 2 
  Mode: learn 
  Time: 0.39 s
  SEM burn-in iterations done: 100/100 
  SEM run iterations done: 100/100 
  Observed log-likelihood: -2458.625 
  BIC: -2475.894 
  ICL: -2512.664 
  Discriminative power:
  Gaussian1 
      0.901 
  Proportions of the mixture:
  0.347 0.653 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1 -3.757 1.732
  k: 2  3.336 1.783
  ####################################
  $nClass: 2 3 4 5 
  $criterion:  BIC 
  $crit: 
              2         3         4         5
  BIC -2475.894 -2332.494 -2289.798 -2294.729
  ICL -2512.664 -2396.033 -2376.578 -2378.986
  
   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.805 
  $mixture$nbFreeParameters: 11 
  $mixture$BIC: -2289.798 
  $mixture$ICL: -2376.578 
  	 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:  4 4 1 3 1 3 ...
  $variable$data$z_class$stat:
        k: 1 k: 2 k: 3 k: 4
  [1,]    0    0    0    1
  [2,]    0    0    0    1
  [3,]    1    0    0    0
  [4,]    0    0    1    0
  [5,]    1    0    0    0
  [6,]    0    0    1    0
  
  	 Other variables: Gaussian1 
  
  $variable$param
  $variable$param$z_class: 
       median q 2.500000% q 97.500000%
  k: 1  0.307   0.3106295    0.3074685
  k: 2  0.340   0.3405573    0.3355965
  k: 3  0.148   0.1444788    0.1503395
  k: 4  0.205   0.2043344    0.2065955
  $variable$param$Gaussian1: 
                   median q 2.500000% q 97.500000%
  k: 1, mean:   4.9872039   4.9314712    5.0361303
  k: 1, sd      0.9965062   0.9444919    1.0610072
  k: 2, mean:   1.9917249   1.9724453    2.0106084
  k: 2, sd      0.4905001   0.4709032    0.5135313
  k: 3, mean:  -1.9355046  -2.0011509   -1.8745287
  k: 3, sd      0.5738269   0.5363462    0.6252485
  k: 4, mean:  -4.9846599  -5.0669228   -4.8901418
  k: 4, sd      0.9725219   0.9067538    1.0564647
  
   $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.625 
  $mixture$nbFreeParameters: 5 
  $mixture$BIC: -2475.894 
  $mixture$ICL: -2512.664 
  	 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.88 0.12
  [5,] 0.00 1.00
  [6,] 0.63 0.37
  
  	 Other variables: Gaussian1 
  
  $variable$param
  $variable$param$z_class: 
       median q 2.500000% q 97.500000%
  k: 1  0.347   0.3421859    0.3486778
  k: 2  0.653   0.6578141    0.6513222
  $variable$param$Gaussian1: 
                  median q 2.500000% q 97.500000%
  k: 1, mean:  -3.756604   -3.850738    -3.665623
  k: 1, sd      1.731926    1.665871     1.823552
  k: 2, mean:   3.335954    3.265175     3.400000
  k: 2, sd      1.783276    1.701803     1.845400
  Start run 1 on thread number 167456
  Run 1 DONE on thread number 167456
  $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