Running examples in 'betapart-Ex.R' failed
The error most likely occurred in:

> ### Name: functional.betapart.core.pairwise
> ### Title: functional.betapart.core.pairwise
> ### Aliases: functional.betapart.core.pairwise
> 
> ### ** Examples
> 
> ##### 4 communities in a 2D functional space (convex hulls are rectangles)
> traits.test <- cbind(c(1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5), 
+                     c(1, 2, 4, 1, 2, 3, 5, 1, 4, 3, 5))
> dimnames(traits.test) <- list(paste("sp", 1:11, sep=""), c("Trait 1", "Trait 2")) 
> 
> comm.test <- matrix(0, 4, 11, dimnames = list(c("A", "B", "C", "D"), 
+                                              paste("sp", 1:11, sep="")))
> comm.test["A", c(1, 2, 4, 5)] <- 1
> comm.test["B", c(1, 3, 8, 9)] <- 1
> comm.test["C", c(6, 7, 10, 11)] <- 1
> comm.test["D", c(2, 4, 7, 9)] <- 1
> 
> plot(5, 5, xlim = c(0, 6), ylim = c(0, 6), type = "n", xlab = "Trait 1", ylab = "Trait 2")
> points(traits.test[, 1], traits.test[, 2], pch = 21, cex = 1.5, bg = "black")
> rect(1, 1, 4, 4, col = "#458B0050", border = "#458B00")
> text(2.5, 2.5, "B" , col = "#458B00", cex = 1.5)	
> polygon(c(2, 1, 3, 4), c(1, 2, 5, 4), col = "#DA70D650", border = "#DA70D6") 
> text(2.5, 3, "D", col = "#DA70D6", cex = 1.5)	
> rect(1, 1, 2, 2, col = "#FF000050", border = "#FF0000")
> text(1.5, 1.5, "A", col = "#FF0000", cex = 1.5)	
> rect(3, 3, 5, 5, col = "#1E90FF50", border = "#1E90FF")
> text(4, 4.2, "C", col = "#1E90FF", cex = 1.5)	
> 
> # for pairwise dissimilarity
> test.core <- functional.betapart.core.pairwise(x = comm.test, traits = traits.test,
+                                                return.details = FALSE)
> test.core
$sumFRi
[1] 19

$FRt
[1] NA

$a
[1] NA

$shared
    A        B        C D
A 0.0 0.000000 0.000000 0
B 1.0 0.000000 0.000000 0
C 0.0 1.000000 0.000000 0
D 0.5 4.166667 1.166667 0

$not.shared
    A         B        C        D
A 0.0 0.0000000 1.000000 0.500000
B 8.0 0.0000000 8.000000 4.833333
C 4.0 3.0000000 0.000000 2.833333
D 4.5 0.8333333 3.833333 0.000000

$sum.not.shared
  A         B         C        D
A 0  8.000000  5.000000 5.000000
B 8  0.000000 11.000000 5.666667
C 5 11.000000  0.000000 6.666667
D 5  5.666667  6.666667 0.000000

$max.not.shared
    A        B        C        D
A 0.0 8.000000 4.000000 4.500000
B 8.0 0.000000 8.000000 4.833333
C 4.0 8.000000 0.000000 3.833333
D 4.5 4.833333 3.833333 0.000000

$min.not.shared
    A         B        C         D
A 0.0 0.0000000 1.000000 0.5000000
B 0.0 0.0000000 3.000000 0.8333333
C 1.0 3.0000000 0.000000 2.8333333
D 0.5 0.8333333 2.833333 0.0000000

$details
[1] NA

attr(,"class")
[1] "functional.betapart"
> # equivalent to 
> test <- functional.betapart.core(x = comm.test, traits = traits.test,
+                                  return.details = FALSE,
+                                  multi = FALSE)
> all.equal(test.core, test)
[1] TRUE
> 
> # using core outputs to compute pairwise and multiple functional dissimilarities
> functional.beta.pair(x = test.core, index.family = "jaccard" )
$funct.beta.jtu
          A         B         C
B 0.0000000                    
C 1.0000000 0.8571429          
D 0.6666667 0.2857143 0.8292683

$funct.beta.jne
           A          B          C
B 0.88888889                      
C 0.00000000 0.05952381           
D 0.24242424 0.29055690 0.02179554

$funct.beta.jac
          A         B         C
B 0.8888889                    
C 1.0000000 0.9166667          
D 0.9090909 0.5762712 0.8510638

> 
> ## Not run: 
> ##D #### using convhulln options
> ##D # a data set that generates NA (due to errors) with functional.betapart.core
> ##D data(betatest)
> ##D # a list of 2 data.frame : comm.test & traits.test
> ##D comm.test <- betatest$comm.test
> ##D traits.test <- betatest$traits.test
> ##D 
> ##D test <- functional.betapart.core(x = comm.test, traits = traits.test,
> ##D                                  return.details = FALSE,
> ##D                                  multi = FALSE)
> ##D 
> ##D any(is.na(test$shared))
> ##D # no NA because the default option was set to QJ
> ##D # if we use the default option of qhull (Qt) :
> ##D test <- functional.betapart.core(x = comm.test, traits = traits.test,
> ##D                                  return.details = FALSE,
> ##D                                  multi = FALSE,
> ##D                                  convhull.opt = list(conv1 = "Qt"))
> ##D any(is.na(test$shared))
> ##D # some NA arise
> ## End(Not run)
> # with functional.betapart.core.pairwise
> test.core <- functional.betapart.core.pairwise(x = comm.test, traits = traits.test,
+                                                return.details = FALSE,
+                                                convhull.opt = list(conv1 = "Qt"))
> any(is.na(test.core$shared))
[1] FALSE
> # here no NA were generated because the volumes of the intersections
> # were computed only with inter_geom
> # to know which functions were used, set return.details to TRUE
> test.core <- functional.betapart.core.pairwise(x = comm.test, traits = traits.test,
+                                                return.details = TRUE,
+                                                convhull.opt = list(conv1 = "Qt"))
> test.core$details$Intersection
NULL
> 
> #### convhull options
> traits.test <- cbind(c(1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5) , 
+                      c(1, 2, 4, 1, 2, 3, 5, 1, 4, 3, 5))
> dimnames(traits.test) <- list(paste("sp", 1:11, sep=""), c("Trait 1", "Trait 2")) 
> 
> comm.test <- matrix(0, 4, 11,
+                     dimnames = list(c("A", "B", "C", "D"), paste("sp", 1:11, sep="")))
> comm.test["A", c(1, 2, 4, 5)] <- 1
> comm.test["B", c(1, 3, 8, 9)] <- 1
> comm.test["C", c(6, 7, 10, 11)] <- 1
> comm.test["D", c(2, 4, 7, 9)] <- 1 
> 
> # simulating a case with species very close to each other
> # here species 2, 4, 3, 8  close to species 1 
> # so it is like commA and commB have only 2 species instead of 4 in the 2D space
> traits.test0<-traits.test
> traits.test0[c(2,5),]<-traits.test0[1,]+10^-6
> traits.test0[c(3,8),]<-traits.test0[1,]+10^-6
> traits.test0
      Trait 1  Trait 2
sp1  1.000000 1.000000
sp2  1.000001 1.000001
sp3  1.000001 1.000001
sp4  2.000000 1.000000
sp5  1.000001 1.000001
sp6  3.000000 3.000000
sp7  3.000000 5.000000
sp8  1.000001 1.000001
sp9  4.000000 4.000000
sp10 5.000000 3.000000
sp11 5.000000 5.000000
> 
> ## Not run: 
> ##D # trying .core function with default qhull option
> ##D core.test0 <- functional.betapart.core(x = comm.test, traits = traits.test0, multi=FALSE,
> ##D                                        convhull.opt = list(conv1 = "Qt"))
> ##D core.test0 # crashing because of coplanarity
> ##D 
> ##D # trying new .core.pairwise with default qhull option for convex hull
> ##D core.pair_test0 <- functional.betapart.core.pairwise(x = comm.test, traits = traits.test0,
> ##D                                                      convhull.opt = list(conv1 = "Qt"))
> ##D 
> ##D # with default qhull options (Qt) it coud be impossible to compute the functional volumes
> ##D # this is why 'Qj' is now used as the default option for the convexhull volumes
> ##D 
> ##D # but other options could be passed to convexhull
> ##D 
> ##D # trying new core.pairwise with Qs for convex hull
> ##D core.pair_test0_Qs <- functional.betapart.core.pairwise(x = comm.test, 
> ##D                                                         traits = traits.test0,
> ##D                                                         convhull.opt = list(conv1= "Qs"))
> ##D # not working
> ## End(Not run)
> 
> # trying new .pairwise with QJ (default option) for convex hull
> core.pair_test0_Qj <- functional.betapart.core.pairwise(x = comm.test, traits = traits.test0,
+                                                         convhull.opt = list(conv1 = "QJ"),
+                                                         return.details = TRUE)