Running 'testthat.R' [10s/12s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(assignPOP)
  > 
  > test_check("assignPOP")
  
    Correct assignment rates were estimated!!
    A total of 3 assignment tests for 3 pops.
    Results were also saved in a 'Rate_of_3_tests_3_pops.txt' file in the directory.-- 1. Error: Calculate assignment accuracy for Monte-Carlo results (@test_accura
  object 'checkTrainInds' not found
  Backtrace:
   1. assignPOP::accuracy.plot(AccuMC)
  
  
    Correct assignment rates were estimated!!
    A total of 3 assignment tests for 3 pops.
    Results were also saved in a 'Rate_of_3_tests_3_pops.txt' file in the directory.
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |==============                                                        |  20%
    |                                                                            
    |============================                                          |  40%
    |                                                                            
    |==========================================                            |  60%
    |                                                                            
    |========================================================              |  80%
    |                                                                            
    |======================================================================| 100%
  
    ################ assignPOP v1.1.7 ################
  
    A GENEPOP format file was successfully imported!
  
    Imported Data Info: 24 obs. by 5 loci (diploid)
    Number of pop: 3
    Number of inds (pop.1): 8
    Number of inds (pop.2): 10
    Number of inds (pop.3): 6
    DataMatrix: 24 rows by 20 columns, with 19 allele variables
  
    Data output in a list comprising the following three elements:
    YOUR_LIST_NAME$DataMatrix
    YOUR_LIST_NAME$SampleID
    YOUR_LIST_NAME$LocusName
  
  
    Parallele computing is off. Analyzing data using 1 CPU core...
  -- 2. Error: Perfrom Monte-Calro cross-validation - loci.sample=random (@test_as
  Need numeric dependent variable for regression.
  Backtrace:
   1. assignPOP::assign.MC(...)
   3. e1071:::svm.formula(...)
   4. e1071:::svm.default(x, y, scale = scale, ..., na.action = na.action)
  
  
    Parallele computing is off. Analyzing data using 1 CPU core...
  
    Monte-Carlo cross-validation done!!
    3 assignment tests completed!!
    Parallele computing is off. Analyzing data using 1 CPU core...
  
    Monte-Carlo cross-validation done!!
    6 assignment tests completed!!
    Parallele computing is off. Analyzing data using 1 CPU core...
  -- 3. Error: Perfrom Monte-Calro cross-validation - model=naiveBayes (@test_assi
  arguments imply differing number of rows: 12, 0
  Backtrace:
   1. assignPOP::assign.MC(...)
   2. base::cbind(...)
   3. base::cbind(deparse.level, ...)
   4. base::data.frame(..., check.names = FALSE)
  
  
    Parallele computing is off. Analyzing data using 1 CPU core...
  -- 4. Error: Perfrom Monte-Calro cross-validation - model=tree (@test_assignMC.R
  type "class" only for classification trees
  Backtrace:
   1. assignPOP::assign.MC(...)
   3. tree:::predict.tree(tree.model, testSetData_PC, type = "class")
  
  
    Parallele computing is off. Analyzing data using 1 CPU core...
  -- 5. Error: Perfrom Monte-Calro cross-validation - model=randomForest (@test_as
  non-numeric argument to binary operator
  Backtrace:
   1. assignPOP::assign.MC(...)
   3. randomForest:::randomForest.formula(...)
   4. randomForest:::randomForest.default(m, y, ...)
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |==============                                                        |  20%
    |                                                                            
    |============================                                          |  40%
    |                                                                            
    |==========================================                            |  60%
    |                                                                            
    |========================================================              |  80%
    |                                                                            
    |======================================================================| 100%
  
    ################ assignPOP v1.1.7 ################
  
    A GENEPOP format file was successfully imported!
  
    Imported Data Info: 24 obs. by 5 loci (diploid)
    Number of pop: 3
    Number of inds (pop.1): 8
    Number of inds (pop.2): 10
    Number of inds (pop.3): 6
    DataMatrix: 24 rows by 20 columns, with 19 allele variables
  
    Data output in a list comprising the following three elements:
    YOUR_LIST_NAME$DataMatrix
    YOUR_LIST_NAME$SampleID
    YOUR_LIST_NAME$LocusName
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |==============                                                        |  20%
    |                                                                            
    |============================                                          |  40%
    |                                                                            
    |==========================================                            |  60%
    |                                                                            
    |========================================================              |  80%
    |                                                                            
    |======================================================================| 100%
  
    ################ assignPOP v1.1.7 ################
  
    A GENEPOP format file was successfully imported!
  
    Imported Data Info: 24 obs. by 5 loci (diploid)
    Number of pop: 1
    Number of inds (pop.1): 24
    DataMatrix: 24 rows by 20 columns, with 19 allele variables
  
    Data output in a list comprising the following three elements:
    YOUR_LIST_NAME$DataMatrix
    YOUR_LIST_NAME$SampleID
    YOUR_LIST_NAME$LocusName
  
  
    Known and unknown datasets have identical features. 
    Performing PCA on genetic data for dimensionality reduction...-- 6. Error: Perform one-time assignment test on unknown individuals (@test_assi
  Need numeric dependent variable for regression.
  Backtrace:
   1. assignPOP::assign.X(...)
   3. e1071:::svm.formula(...)
   4. e1071:::svm.default(x, y, scale = scale, ..., na.action = na.action)
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |==============                                                        |  20%
    |                                                                            
    |============================                                          |  40%
    |                                                                            
    |==========================================                            |  60%
    |                                                                            
    |========================================================              |  80%
    |                                                                            
    |======================================================================| 100%
  
    ################ assignPOP v1.1.7 ################
  
    A GENEPOP format file was successfully imported!
  
    Imported Data Info: 24 obs. by 5 loci (diploid)
    Number of pop: 3
    Number of inds (pop.1): 8
    Number of inds (pop.2): 10
    Number of inds (pop.3): 6
    DataMatrix: 24 rows by 20 columns, with 19 allele variables
  
    Data output in a list comprising the following three elements:
    YOUR_LIST_NAME$DataMatrix
    YOUR_LIST_NAME$SampleID
    YOUR_LIST_NAME$LocusName
  
  
    Parallele computing is off. Analyzing data using 1 CPU core...
  -- 7. Error: Perform K-fold cross-validation, genetic data (@test_assignkfold.R#
  Need numeric dependent variable for regression.
  Backtrace:
   1. assignPOP::assign.kfold(...)
   3. e1071:::svm.formula(...)
   4. e1071:::svm.default(x, y, scale = scale, ..., na.action = na.action)
  
    Import a .CSV file.
    4 additional variables detected.
    Checking variable data type...
     ng1(integer)   ng2(integer)   ng3(integer)   ng4(integer)
    New data set created!!
    It has 24 observations by 24 variables
    including 4 loci(19 alleles) plus 4 additional variables(4 columns)
    Parallele computing is off. Analyzing data using 1 CPU core...
  -- 8. Error: Perform K-fold cross-validation, integrated data (@test_assignkfold
  Need numeric dependent variable for regression.
  Backtrace:
   1. assignPOP::assign.kfold(...)
   3. e1071:::svm.formula(...)
   4. e1071:::svm.default(x, y, scale = scale, ..., na.action = na.action)
  
  
    Convert sample ID to factor. 
  
    Convert population label to factor. 
    ng1(integer)  ng2(integer)  ng3(integer)  ng4(integer)
    Parallele computing is off. Analyzing data using 1 CPU core...
  
    K-fold cross-validation done!!
    3 assignment tests completed!!
    Results were saved in a 'High_Fst_Locus_Freq.txt' file in the directory.== testthat results  ===========================================================
  [ OK: 27 | SKIPPED: 0 | WARNINGS: 3 | FAILED: 8 ]
  1. Error: Calculate assignment accuracy for Monte-Carlo results (@test_accuracy.R#7) 
  2. Error: Perfrom Monte-Calro cross-validation - loci.sample=random (@test_assignMC.R#6) 
  3. Error: Perfrom Monte-Calro cross-validation - model=naiveBayes (@test_assignMC.R#27) 
  4. Error: Perfrom Monte-Calro cross-validation - model=tree (@test_assignMC.R#34) 
  5. Error: Perfrom Monte-Calro cross-validation - model=randomForest (@test_assignMC.R#41) 
  6. Error: Perform one-time assignment test on unknown individuals (@test_assignX.R#7) 
  7. Error: Perform K-fold cross-validation, genetic data (@test_assignkfold.R#6) 
  8. Error: Perform K-fold cross-validation, integrated data (@test_assignkfold.R#15) 
  
  Error: testthat unit tests failed
  Execution halted