Running ‘testthat.R’ [191s/206s]
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.029s
  -- 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.076s
  -- 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.101s
  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.104s
  Total runtime: 0.107s
  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.048s
  Total runtime: 0.059s
  Best model according to BIC: 2 clusters.
  ── 1. Failure: mixtCompLearn works in basic mode + predict (@test.runWrapper.R#7
  RMixtCompIO:::rand.index(getPartition(resLearn), rep(1:2, each = 100)) is not more than 0.95. Difference: -0.123
  
  ── 2. Failure: mixtCompLearn works in basic mode + predict (@test.runWrapper.R#9
  RMixtCompIO:::rand.index(getPartition(resPredict), rep(1:2, each = 100)) is not more than 0.95. Difference: -0.123
  
  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.02s
  Total runtime: 0.029s
  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.022s
  Total runtime: 0.034s
  Best model according to BIC: 3 clusters.
     
        1   2   3   4
    1   9  16 362   7
    2  33   3   8 600
    3   6 291   8   2
    4 618   3   5  29
  ====== 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.014s
  -- 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.284s
  -- 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 2.071s
  -- 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.919s
  Total runtime: 7.289s
  Best model according to BIC: 4 clusters.
     
        1   2   3   4
    1   5   0 188   4
    2  18 283   4   4
    3   3   1   6 142
    4 328   7   3   4
  ############### MixtCompLearn Run ###############
  nClass: 2 3 4 5 
  Criterion used: BIC 
              2         3         4         5
  BIC -2461.964 -2330.804 -2278.735 -2287.195
  ICL -2499.526 -2401.482 -2375.291 -2528.548
  Best model: 4 clusters 
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 4 
  Mode: learn 
  Time: 0.389 s
  SEM burn-in iterations done: 80/100 
  SEM run iterations done: 11/100 
  Observed log-likelihood: -2240.743 
  BIC: -2278.735 
  ICL: -2375.291 
  Discriminative power:
  Gaussian1 
      0.903 
  Proportions of the mixture:
  0.343 0.301 0.205 0.151 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1  2.031 0.522
  k: 2  5.022 0.970
  k: 3 -4.997 1.047
  k: 4 -1.989 0.509
  ####################################
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 2 
  Mode: learn 
  Time: 0.209 s
  SEM burn-in iterations done: 59/100 
  SEM run iterations done: 11/100 
  Observed log-likelihood: -2444.695 
  BIC: -2461.964 
  ICL: -2499.526 
  Discriminative power:
  Gaussian1 
      0.907 
  Proportions of the mixture:
  0.349 0.651 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1 -3.754 1.731
  k: 2  3.377 1.744
  ####################################
  $nClass: 2 3 4 5 
  $criterion:  BIC 
  $crit: 
              2         3         4         5
  BIC -2461.964 -2330.804 -2278.735 -2287.195
  ICL -2499.526 -2401.482 -2375.291 -2528.548
  
   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: -2240.743 
  $mixture$nbFreeParameters: 11 
  $mixture$BIC: -2278.735 
  $mixture$ICL: -2375.291 
  	 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 2 4 2 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,]    0    1    0    0
  [4,]    0    0    0    1
  [5,]    0    1    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.343   0.3449335    0.3440860
  k: 2  0.301   0.2988741    0.3000978
  k: 3  0.205   0.2067554    0.2052786
  k: 4  0.151   0.1494371    0.1505376
  $variable$param$Gaussian1: 
                   median q 2.500000% q 97.500000%
  k: 1, mean:   2.0308708   2.0088677    2.0717761
  k: 1, sd      0.5224339   0.5069159    0.5520839
  k: 2, mean:   5.0223765   4.9713607    5.0845672
  k: 2, sd      0.9696021   0.9145723    1.0046944
  k: 3, mean:  -4.9971811  -5.0570308   -4.9403221
  k: 3, sd      1.0467298   0.9924140    1.1271309
  k: 4, mean:  -1.9885421  -2.0121830   -1.9541157
  k: 4, sd      0.5094172   0.4914787    0.5447009
  
   $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: -2444.695 
  $mixture$nbFreeParameters: 5 
  $mixture$BIC: -2461.964 
  $mixture$ICL: -2499.526 
  	 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.91 0.09
  [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.349    0.347432    0.3495531
  k: 2  0.651    0.652568    0.6504469
  $variable$param$Gaussian1: 
                  median q 2.500000% q 97.500000%
  k: 1, mean:  -3.754159   -3.803097    -3.727924
  k: 1, sd      1.730696    1.693051     1.821035
  k: 2, mean:   3.376765    3.352140     3.420286
  k: 2, sd      1.744143    1.716011     1.778174
  Start run 1
  Run 1 DONE 
  $warnLog
  [1] "Crash."
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 371 | SKIPPED: 2 | WARNINGS: 2 | FAILED: 2 ]
  1. Failure: mixtCompLearn works in basic mode + predict (@test.runWrapper.R#74) 
  2. Failure: mixtCompLearn works in basic mode + predict (@test.runWrapper.R#95) 
  
  Error: testthat unit tests failed
  Execution halted