Running examples in ‘dispRity-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: adonis.dispRity
> ### Title: adonis dispRity (from 'vegan::adonis2')
> ### Aliases: adonis.dispRity
> 
> ### ** Examples
> 
> ## Adonis with one groups 
> 
> ## Generating a random character matrix
> character_matrix <- sim.morpho(rtree(20), 50, rates = c(rnorm, 1, 0))
> ## Calculating the distance matrix
> distance_matrix <- as.matrix(dist(character_matrix))
> ## Creating two groups
> random_groups <- list("group1" = 1:10, "group2" = 11:20)
> 
> ## Generating a dispRity object
> random_disparity <- custom.subsets(distance_matrix, random_groups)
Warning: custom.subsets is applied on what seems to be a distance matrix.
The resulting matrices won't be distance matrices anymore!
You can use dist.data = TRUE, if you want to keep the data as a distance matrix.
> ## Running a default NPMANOVA
> adonis.dispRity(random_disparity)
Permutation test for adonis under reduced model
Permutation: free
Number of permutations: 999

vegan::adonis2(formula = matrix ~ group, method = "euclidean")
         Df SumOfSqs      R2      F Pr(>F)
Model     1     14.2 0.06443 1.2396  0.166
Residual 18    206.2 0.93557              
Total    19    220.4 1.00000              
> 
> 
> ## Adonis with multiple groups
> 
> ## Creating a random matrix
> random_matrix <- matrix(data = rnorm(90), nrow = 10, 
+                      dimnames = list(letters[1:10]))
> ## Creating two groups with two states each
> groups <- as.data.frame(matrix(data = c(rep(1,5), rep(2,5), rep(c(1,2), 5)),
+          nrow = 10, ncol = 2, dimnames = list(letters[1:10], c("g1", "g2"))))
> 
> ## Creating the dispRity object
> multi_groups <- custom.subsets(random_matrix, groups)
> 
> ## Running the NPMANOVA
> adonis.dispRity(multi_groups, matrix ~ g1 + g2)
Warning in adonis.dispRity(multi_groups, matrix ~ g1 + g2) :
  The input data for adonis.dispRity was not a distance matrix.
The results are thus based on the distance matrix for the input data (i.e. dist(data$matrix[[1]])).
Make sure that this is the desired methodological approach!
Permutation test for adonis under reduced model
Permutation: free
Number of permutations: 999

vegan::adonis2(formula = dist(matrix) ~ g1 + g2, method = "euclidean")
         Df SumOfSqs      R2      F Pr(>F)
Model     2   21.461 0.26492 1.2614  0.252
Residual  7   59.546 0.73508              
Total     9   81.007 1.00000              
> 
> ## Adonis with time
> 
> ## Creating time series
> data(BeckLee_mat50)
> data(BeckLee_tree)
> data(BeckLee_ages)
> time_subsets <- chrono.subsets(BeckLee_mat50, BeckLee_tree, 
+      method = "discrete", inc.nodes = FALSE, time = c(100, 85, 65, 0),
+      FADLAD = BeckLee_ages)
> 
> ## Running the NPMANOVA with time as a predictor
> adonis.dispRity(time_subsets, matrix ~ time)
Permutation test for adonis under reduced model
Permutation: free
Number of permutations: 999

vegan::adonis2(formula = dist(matrix) ~ time, method = "euclidean")
         Df SumOfSqs      R2      F Pr(>F)    
Model     2    9.593 0.07769 1.9796  0.001 ***
Residual 47  113.884 0.92231                  
Total    49  123.477 1.00000                  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Warning message:
In adonis.dispRity(time_subsets, matrix ~ time) :*** buffer overflow detected ***: terminated
Aborted