recluster: Ordination methods for biodiversity patterns.

Description Details Author(s) References Examples

Description

The analysis of different aspects of biodiversity requires specific algorithms. For example, in regionalisation analyses, the high frequency of ties and zero values in dissimilarity matrices produced by Beta-diversity turnover produces hierarchical cluster dendrograms whose topology and bootstrap supports are affected by the order of rows in the original matrix. Moreover, visualisation of biogeographical regionalisation can be facilitated by a combination of hierarchical clustering and multi-dimensional scaling. The recluster package provides robust techniques to visualise and analyse pattern of biodiversity and to improve occurrence data for cryptic taxa. Other functions related to recluster (e.g. the biodecrypt family) are currently available in GitHub at https://github.com/leondap/recluster.

Details

Package: recluster
Type: Package
Version: 2.9
Date: 2020-07-25
License: GPL (>= 2.0)

Author(s)

Leonardo Dapporto, Matteo Ramazzotti, Simone Fattorini, Roger Vila, Gerard Talavera, Roger H.L. Dennis Maintainer: Leonardo Dapporto <leondap@gmail.com>

References

Dapporto L., Ramazzotti M., Fattorini S., Talavera G., Vila R., Dennis R. "recluster: an unbiased clustering procedure for beta-diversity turnover" Ecography (2013), 36:1070-1075.

Dapporto, L., Fattorini, S., Voda, R., Dinca, V., Vila, R. "Biogeography of western Mediterranean butterflies: combining turnover and nestedness components of faunal dissimilarity." J Biogeogr (2014), 41: 1639-1650.

Dapporto L., Voda R., Dinca V., Vila R. "Comparing population patterns for genetic and morphological markers with uneven sample sizes. An example for the butterfly Maniola jurtina" Methods Ecol Evol (2014), 5, 834-843.

Platania L., Menchetti M. Dinca V., Corbella C., Kay-Lavelle I., Vila R., Wiemers M., Schweiger O., Dapporto L. "Assigning occurrence data to cryptic taxa improves climatic niche assessments: biodecrypt, a new tool tested on European butterflies". Glocal Ecology and Biogeography (2020).

https://github.com/leondap/recluster

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#load model data provided with the package 
## Not run: 
data(datamod)

#explore zero and tied values in the data set
simpdiss<- recluster.dist(datamod)
recluster.hist(simpdiss)

#create and view unbiased consensus tree (100
constree_full<-recluster.cons(datamod, tr=10, p=1)
plot(constree_full$cons,direction="downwards")

#compute and view node strength
recluster.node.strength(datamod, tr=10)

#create and view unbiased consensus tree (50
constree_half<-recluster.cons(datamod, tr=10, p=0.5)
plot(constree_half$cons, direction="downwards")

#the latter is the correct tree
tree<-constree_half$cons

#perform and view bootstrap on nodes
boot<-recluster.boot(tree, datamod, tr=10, p=0.5, boot=50)
recluster.plot(tree,boot)

#perform and view multiscale bootstrap on nodes
multiboot<- recluster.multi(tree, datamod, tr=10, boot=50, levels=2, step=1)
recluster.plot(tree,multiboot,low=1,high=2, direction="downwards")

#project and plot a bi-dimensional plot in the RGB colour space
sordiss<- recluster.dist(datamod,dist="sorensen")
points<-cmdscale(sordiss)
col<-recluster.col(points)
recluster.plot.col(col)

#inspect explained diversity for different cuts of a tree
tree<-recluster.cons(datamod, dist="sorensen",tr=10, p=0.5)
expl_div<-recluster.expl.diss(tree$cons,sordiss)
expl_div

#Select cut #4 and group data in RGB space
ncol<-recluster.group.col(col,expl_div$matrix[,4])

#Plot mean values for clusters
recluster.plot.col(ncol$aggr)

#Plot mean colours for sites in the geographic space
lat<-c(2,2,2,1,3,1,1,3,3)
long<-c(1,5,3,3,3,1,5,1,5)
recluster.plot.sites.col(long, lat, ncol$all,text=TRUE)

#Use recluster.region procedure on island butterflies
data(dataisl)
simpson<-recluster.dist(dataisl)
turn_cl<-recluster.region(simpson,tr=10,rettree=TRUE)
turn_cl

#Select solution with three cluster and plot the tree.
plot(turn_cl$tree[[2]])
turn_cl$grouping

#Perform a procrustes with uneven sample size
#Create and plot a target matrix
ex1 <-rbind(c(1,5),c(5,5),c(3,4),c(3,6))
plot(ex1,col=c(1:4),pch=19,xlim=c(0,6),ylim=c(0,6),cex=2)
#Create and plot a matrix to be rotated. Only the points 1-4 are shared
ex2<-rbind(c(3,1),c(3,3),c(2.5,2),c(3.5,2),c(3,4))
plot(ex2,col=c(1:5),pch=19,xlim=c(0,6),ylim=c(0,6),cex=2)

#Perform the procrustes on points 1-4
#Apply the transformation to point 5 of ex2 and plot the matrices
procr1<-recluster.procrustes(ex1,ex2,num=4)
plot(procr1$X,col=c(1:4),pch=19,xlim=c(-4,4),ylim=c(-4,4),cex=2)
plot(procr1$Yrot,col=c(1:5),pch=19,xlim=c(-4,4),ylim=c(-4,4),cex=2)

## End(Not run)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
Loading required package: ape
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
$result
          [,1]
[1,] 100.00000
[2,]  16.66667
[3,]        NA
[4,]  16.66667
[5,]  50.00000
[6,]  33.33333
[7,]        NA
[8,]  16.66667

$tree

Phylogenetic tree with 9 tips and 8 internal nodes.

Tip labels:
	A, B, lint, sint, xint, lA, ...

Rooted; includes branch lengths.

$matrix
     [,1] [,2] [,3] [,4] [,5] [,6]
A       1    2    4    4    4    4
B       1    2    4    4    5    5
lint    1    1    1    1    1    1
sint    2    3    5    5    6    6
xint    2    3    5    5    6    6
lA      1    1    2    2    2    2
lB      1    1    3    3    3    3
sA      2    3    5    6    7    7
sB      2    3    5    6    7    8

$expl.div
[1] 0.7100320 0.8505178 0.9021547 0.9670318 0.9809341 0.9920559

$nclust
[1] 2 3 5 6 7 8

The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
$solutions
     k      silh   ex.diss
[1,] 2 0.4044767 0.4746823
[2,] 3 0.4042332 0.7881792

$tree
$tree[[1]]

Call:
hclust(d = as.dist(matrices[, , pamr]), method = method)

Cluster method   : ward.D 
Number of objects: 31 


$tree[[2]]

Call:
hclust(d = as.dist(matrices[, , pamr]), method = method)

Cluster method   : ward.D 
Number of objects: 31 



$grouping
      2 3
 [1,] 1 1
 [2,] 1 1
 [3,] 2 2
 [4,] 1 1
 [5,] 2 2
 [6,] 2 2
 [7,] 2 2
 [8,] 2 3
 [9,] 2 3
[10,] 2 2
[11,] 2 3
[12,] 2 2
[13,] 2 3
[14,] 2 3
[15,] 2 2
[16,] 1 1
[17,] 2 3
[18,] 2 3
[19,] 2 3
[20,] 1 1
[21,] 2 3
[22,] 2 2
[23,] 2 2
[24,] 2 2
[25,] 1 1
[26,] 2 3
[27,] 1 1
[28,] 2 3
[29,] 2 3
[30,] 2 3
[31,] 2 3

      2 3
 [1,] 1 1
 [2,] 1 1
 [3,] 2 2
 [4,] 1 1
 [5,] 2 2
 [6,] 2 2
 [7,] 2 2
 [8,] 2 3
 [9,] 2 3
[10,] 2 2
[11,] 2 3
[12,] 2 2
[13,] 2 3
[14,] 2 3
[15,] 2 2
[16,] 1 1
[17,] 2 3
[18,] 2 3
[19,] 2 3
[20,] 1 1
[21,] 2 3
[22,] 2 2
[23,] 2 2
[24,] 2 2
[25,] 1 1
[26,] 2 3
[27,] 1 1
[28,] 2 3
[29,] 2 3
[30,] 2 3
[31,] 2 3

recluster documentation built on July 27, 2020, 1:15 a.m.