disc {ade4}R Documentation

Rao's dissimilarity coefficient

Description

Calculates the root square of Rao's dissimilarity coefficient between samples.

Usage

disc(samples, dis = NULL, structures = NULL)

Arguments

samples a data frame with elements as rows, samples as columns, and abundance, presence-absence or frequencies as entries
dis an object of class dist containing distances or dissimilarities among elements. If dis is NULL, equidistances are used.
structures a data frame containing, in the jth row and the kth column, the name of the group of level k to which the jth population belongs.

Value

Returns a list of objects of class dist

Author(s)

Sandrine Pavoine pavoine@biomserv.univ-lyon1.fr

References

Rao, C.R. (1982) Diversity and dissimilarity coefficients: a unified approach. Theoretical Population Biology, 21, 24–43.

Examples

data(humDNAm)
humDNA.dist <- disc(humDNAm$samples, sqrt(humDNAm$distances), humDNAm$structures)
humDNA.dist
is.euclid(humDNA.dist$samples)
is.euclid(humDNA.dist$regions)

## Not run: 
data(ecomor)
dtaxo <- dist.taxo(ecomor$taxo)
ecomor.dist <- disc(ecomor$habitat, dtaxo)
ecomor.dist
is.euclid(ecomor.dist)

## End(Not run)

Worked out examples


> library(ade4)
> ### Name: disc
> ### Title: Rao's dissimilarity coefficient
> ### Aliases: disc
> ### Keywords: multivariate
> 
> ### ** Examples
> 
> data(humDNAm)
> humDNA.dist <- disc(humDNAm$samples, sqrt(humDNAm$distances), humDNAm$structures)
> humDNA.dist
$samples
          oriental     tharu     wolof      peul      pima      maya   finnish
tharu    0.2520200                                                            
wolof    0.7821356 0.7965116                                                  
peul     0.8506600 0.8632233 0.1251814                                        
pima     0.1994968 0.2755218 0.7582823 0.8338317                              
maya     0.2559697 0.3023221 0.7177691 0.7857762 0.1406173                    
finnish  0.2455583 0.3043545 0.7615230 0.8367302 0.1416780 0.1899101          
sicilian 0.2966927 0.3553515 0.7194281 0.7871977 0.2731589 0.2783955 0.2593187
israelij 0.3578283 0.4564520 0.7963554 0.8604647 0.3906841 0.4075339 0.3601095
israelia 0.4102655 0.4363589 0.5822519 0.6437361 0.3588124 0.3027937 0.2984287
          sicilian  israelij
tharu                       
wolof                       
peul                        
pima                        
maya                        
finnish                     
sicilian                    
israelij 0.3690240          
israelia 0.3541134 0.3947386

$regions
              africa   america      asia    europe
america    0.7609083                              
asia       0.8016371 0.2280650                    
europe     0.7519837 0.1646208 0.2553667          
middleeast 0.6866876 0.3045622 0.3592600 0.2518122

> is.euclid(humDNA.dist$samples)
[1] TRUE
> is.euclid(humDNA.dist$regions)
[1] TRUE
> 
> data(ecomor)
> dtaxo <- dist.taxo(ecomor$taxo)
> ecomor.dist <- disc(ecomor$habitat, dtaxo)
> ecomor.dist
          Bu1       Bu2       Bu3       Bu4       Ca1       Ca2       Ca3
Bu2 0.2299347                                                            
Bu3 0.4445234 0.3141620                                                  
Bu4 0.4678652 0.3406236 0.1103982                                        
Ca1 0.9502364 0.9410382 0.9761147 0.9754643                              
Ca2 0.7570846 0.6969114 0.6931755 0.6831109 0.7205767                    
Ca3 0.6664796 0.6062407 0.5893602 0.5770824 0.7687061 0.3344968          
Ca4 0.6231089 0.5463245 0.5427678 0.5311937 0.8279776 0.4048608 0.2460627
Ch1 0.9154968 0.9333730 0.9795237 0.9785106 0.8164966 0.8320503 0.8348471
Ch2 0.7724173 0.7866902 0.8353195 0.8341313 0.7807075 0.7237678 0.7041788
Ch3 0.6682402 0.6073798 0.5940866 0.5796164 0.8740074 0.5520455 0.4842859
Ch4 0.6816037 0.6245146 0.6131992 0.5984060 0.8861820 0.6018651 0.5296545
Pr1 0.5692630 0.5863691 0.6962758 0.6975175 0.9797959 0.7686151 0.7109533
Pr2 0.4720870 0.4953128 0.6158982 0.6185896 0.9845749 0.7754069 0.7084175
Pr3 0.5972043 0.5302328 0.6142023 0.6197341 1.0441637 0.7817360 0.7264832
Pr4 0.4555487 0.3920131 0.4335007 0.4510596 1.0021244 0.7372591 0.6648311
          Ca4       Ch1       Ch2       Ch3       Ch4       Pr1       Pr2
Bu2                                                                      
Bu3                                                                      
Bu4                                                                      
Ca1                                                                      
Ca2                                                                      
Ca3                                                                      
Ca4                                                                      
Ch1 0.8527682                                                            
Ch2 0.7048089 0.4391326                                                  
Ch3 0.4436571 0.7750448 0.5833087                                        
Ch4 0.4888328 0.8404589 0.6644347 0.2797579                              
Pr1 0.6813933 0.9626353 0.8320045 0.7281064 0.7490714                    
Pr2 0.6771308 0.9600879 0.8243429 0.7089583 0.7274218 0.2941609          
Pr3 0.6882887 1.0540926 0.9216307 0.7288690 0.7562197 0.5206833 0.3897787
Pr4 0.6262953 0.9930445 0.8511342 0.6679306 0.6936998 0.5605830 0.4527776
          Pr3
Bu2          
Bu3          
Bu4          
Ca1          
Ca2          
Ca3          
Ca4          
Ch1          
Ch2          
Ch3          
Ch4          
Pr1          
Pr2          
Pr3          
Pr4 0.4119615
> is.euclid(ecomor.dist)
[1] TRUE
> 
> 
> 
> 
> 

[Package ade4 Index]