Running ‘tests.R’
Running the tests in ‘tests/tests.R’ failed.
Complete output:
  > library(mefa)
  mefa 3.2-7 	 2016-01-11
  > demo(mefa)
  
  
  	demo(mefa)
  	---- ~~~~
  
  > wait <- function(vign=0) {
  +   if (vign!=0) {
  +     if (vign==1) {
  +         ANSWER <- readline("Do you want to open the vignette? (y/n) ")
  +         if (substr(tolower(ANSWER), 1, 1) == "y")
  +         vignette("mefa", package = "mefa")}
  +     if (vign==2) {
  +         ANSWER <- readline("Do you want to check out mefa website? (y/n) ")
  +         if (substr(tolower(ANSWER), 1, 1) == "y")
  +         mefaweb()}
  +   } else {
  +     ANSWER <- readline("Please press ENTER to continue ... ")
  +   }
  + }
  
  > cat("## Demo for the 'mefa' package")
  ## Demo for the 'mefa' package
  > wait(1)
  Do you want to open the vignette? (y/n) 
  
  > cat("## Load the package and the example data set")
  ## Load the package and the example data set
  > library(mefa)
  
  > data(dol.count, dol.samp, dol.taxa)
  
  > str(dol.count)
  'data.frame':	297 obs. of  4 variables:
   $ samp : Factor w/ 24 levels "DQ1","DQ2","DQ3",..: 7 7 7 7 7 7 7 10 8 8 ...
   $ taxa : Factor w/ 32 levels "aacu","amin",..: 1 2 2 13 17 25 25 32 1 2 ...
   $ count: num  1 1 2 1 1 13 15 0 1 1 ...
   $ segm : Factor w/ 3 levels "fresh","broken",..: 1 2 1 2 2 1 2 3 1 2 ...
  
  > str(dol.samp)
  'data.frame':	24 obs. of  2 variables:
   $ microhab: Factor w/ 4 levels "dead.wood","litter",..: 2 2 2 2 2 1 1 1 1 1 ...
   $ method  : Factor w/ 2 levels "time","quadrat": 2 2 1 2 1 2 1 2 1 2 ...
  
  > str(dol.taxa)
  'data.frame':	121 obs. of  4 variables:
   $ species: Factor w/ 121 levels "Acanthinula aculeata",..: 3 2 81 82 16 17 92 93 72 32 ...
   $ author : Factor w/ 65 levels "(Alder, 1830)",..: 26 53 42 19 44 47 31 14 47 43 ...
   $ familia: Factor w/ 21 levels "Aciculidae","Bradybaenidae",..: 1 1 14 14 6 6 17 17 17 5 ...
   $ size   : num  3.4 5.5 16 16 2.2 2.3 17 8 12 7.5 ...
  
  > wait()
  Please press ENTER to continue ... 
  
  > cat("## Object classes")
  ## Object classes
  > cat("## 'stcs'")
  ## 'stcs'
  > x1 <- stcs(dol.count)
  
  > str(x1)
  Classes 'stcs' and 'data.frame':	297 obs. of  4 variables:
   $ samp : Factor w/ 24 levels "DQ1","DQ2","DQ3",..: 1 1 1 1 1 1 1 2 2 2 ...
   $ taxa : Factor w/ 29 levels "aacu","amin",..: 2 2 9 11 14 28 28 2 2 3 ...
   $ count: num  2 2 2 2 1 2 7 1 3 1 ...
   $ segm : Factor w/ 3 levels "fresh","broken",..: 1 2 1 1 1 2 1 2 1 2 ...
   - attr(*, "call")= language stcs(dframe = dol.count)
   - attr(*, "expand")= logi FALSE
   - attr(*, "zero.count")= logi TRUE
   - attr(*, "zero.pseudo")= chr "zero.pseudo"
  
  > unique(x1$count)
   [1]  2  1  7  3 13  4  5 15  8 10 16 17 25  0  6  9 19 12 22 26
  
  > wait()
  Please press ENTER to continue ... 
  
  > x2 <- stcs(dol.count, expand = TRUE)
  
  > str(x2)
  Classes 'stcs' and 'data.frame':	732 obs. of  4 variables:
   $ samp : Factor w/ 24 levels "DQ1","DQ2","DQ3",..: 1 1 1 1 1 1 1 1 1 1 ...
   $ taxa : Factor w/ 29 levels "aacu","amin",..: 2 2 2 2 9 9 11 11 14 28 ...
   $ count: num  1 1 1 1 1 1 1 1 1 1 ...
   $ segm : Factor w/ 3 levels "fresh","broken",..: 1 1 2 2 1 1 1 1 1 1 ...
   - attr(*, "call")= language stcs(dframe = dol.count, expand = TRUE)
   - attr(*, "expand")= logi TRUE
   - attr(*, "zero.count")= logi TRUE
   - attr(*, "zero.pseudo")= chr "zero.pseudo"
  
  > sum(x2$count)
  [1] 731
  
  > unique(x2$count)
  [1] 1 0
  
  > wait()
  Please press ENTER to continue ... 
  
  > x3 <- stcs(dol.count, drop.zero = TRUE)
  
  > str(x3)
  Classes 'stcs' and 'data.frame':	296 obs. of  4 variables:
   $ samp : Factor w/ 23 levels "DQ1","DQ2","DQ3",..: 7 7 7 7 7 7 7 8 8 8 ...
   $ taxa : Factor w/ 28 levels "aacu","amin",..: 1 2 2 11 15 23 23 1 2 11 ...
   $ count: num  1 1 2 1 1 13 15 1 1 1 ...
   $ segm : Factor w/ 2 levels "fresh","broken": 1 2 1 2 2 1 2 1 2 1 ...
   - attr(*, "call")= language stcs(dframe = dol.count, drop.zero = TRUE)
   - attr(*, "expand")= logi FALSE
   - attr(*, "zero.count")= logi FALSE
   - attr(*, "zero.pseudo")= chr "not.defined"
  
  > unique(x3$count)
   [1]  1  2 13 15  5  8  3 10 16 17 25  7  4 12 22 26  6  9 19
  
  > wait()
  Please press ENTER to continue ... 
  
  > cat("## 'mefa'")
  ## 'mefa'
  > m1 <- mefa(x1)
  
  > m1
  
  An object of class 'mefa' containing
  
  Error in if (sum(x$xtab) == 1) " individual" else " individuals" : 
    missing value where TRUE/FALSE needed
  Calls: demo -> source -> print -> print.mefa
  Execution halted