# SPecies Association Analysis

`spaa-package.Rd`

Miscellaneous functions for analysing species association and niche overlap.

## Details

The DESCRIPTION file: This package was not yet installed at build time.
Index: This package was not yet installed at build time.

## Author

Jinlong Zhang [aut, cre]

Maintainer: Jinlong Zhang <jinlongzhang01@gmail.com>

## References

Zhang Jin-tun,(2004) Quantitative Ecology, Science Press, Beijing

## Examples

      library(vegan)
      data(BCI)
      ## select the top 30 species according to relative frequeny.
      sub <- sub.sp.matrix(BCI, common = 30)
      ## Set the digits to 1
      plotlowertri(cor(sub), size = TRUE, cex = 3, digits = 1)

      ## Niche width and niche overlap
      data(datasample)
      niche.overlap.boot(datasample[,1:3], method = "levins")
    #>                                       Observed Boot mean Boot std Boot CI1
    #> Castanopsis.eyrei-Schima.superba         0.921     0.930    0.052    0.819
    #> Castanopsis.eyrei-Rhododendron.ovatum    0.947     0.955    0.048    0.856
    #> Schima.superba-Rhododendron.ovatum       0.772     0.803    0.191    0.446
    #>                                       Boot CI2 times
    #> Castanopsis.eyrei-Schima.superba         1.022  1000
    #> Castanopsis.eyrei-Rhododendron.ovatum    1.063  1000
    #> Schima.superba-Rhododendron.ovatum       1.112  1000  niche.overlap(datasample, method = "levins")
    #>                         Castanopsis.eyrei Schima.superba Rhododendron.ovatum
    #> Schima.superba                 0.92060290
    #> Rhododendron.ovatum            0.94733410     0.77210028
    #> Cyclobalanopsis.glauca         0.78136218     0.67083329          0.31064433
    #> Daphniphyllum.oldhamii         0.90712368     1.02620020          0.74612792
    #> Loropetalum.chinensis          0.76831186     0.82233431          0.39604740
    #> Pinus.massoniana               0.83822850     1.03077313          0.52217984
    #> Rhododendron.latoucheae        0.72939232     0.62732689          0.70781209
    #> Vaccinium.bracteatum           0.85520794     0.47531617          0.86604862
    #> Lithocarpus.glaber             0.74471678     0.39885806          0.80173563
    #> Syzygium.buxifolium            0.81059630     1.02588320          0.89881966
    #> Castanopsis.tibetana           0.49037500     0.49392988          0.68266608
    #> Castanopsis.fargesii           0.51022451     0.64525500          0.34753237
    #> Photinia.serrulata             0.72601066     0.39296943          0.97143864
    #>                         Cyclobalanopsis.glauca Daphniphyllum.oldhamii
    #> Schima.superba
    #> Rhododendron.ovatum
    #> Cyclobalanopsis.glauca
    #> Daphniphyllum.oldhamii              0.25434174
    #> Loropetalum.chinensis               0.67894492             0.65106204
    #> Pinus.massoniana                    0.18169464             0.72253314
    #> Rhododendron.latoucheae             0.25113670             0.39535997
    #> Vaccinium.bracteatum                0.42946877             0.56531185
    #> Lithocarpus.glaber                  0.60640888             0.30362848
    #> Syzygium.buxifolium                 0.32044781             0.57468308
    #> Castanopsis.tibetana                0.54136905             0.15650821
    #> Castanopsis.fargesii                0.81931925             0.33970714
    #> Photinia.serrulata                  0.08501254             0.46804153
    #>                         Loropetalum.chinensis Pinus.massoniana
    #> Schima.superba
    #> Rhododendron.ovatum
    #> Cyclobalanopsis.glauca
    #> Daphniphyllum.oldhamii
    #> Loropetalum.chinensis
    #> Pinus.massoniana                   0.50551660
    #> Rhododendron.latoucheae            0.42075698       0.51365887
    #> Vaccinium.bracteatum               0.72499084       0.18302898
    #> Lithocarpus.glaber                 0.40257540       0.06820803
    #> Syzygium.buxifolium                0.37303657       0.39534988
    #> Castanopsis.tibetana               0.40264862       0.00000000
    #> Castanopsis.fargesii               1.05521489       0.00000000
    #> Photinia.serrulata                 0.22976010       0.63076385
    #>                         Rhododendron.latoucheae Vaccinium.bracteatum
    #> Schima.superba
    #> Rhododendron.ovatum
    #> Cyclobalanopsis.glauca
    #> Daphniphyllum.oldhamii
    #> Loropetalum.chinensis
    #> Pinus.massoniana
    #> Rhododendron.latoucheae
    #> Vaccinium.bracteatum                 0.73000011
    #> Lithocarpus.glaber                   0.80409253           0.65124182
    #> Syzygium.buxifolium                  0.35815982           0.07622100
    #> Castanopsis.tibetana                 1.04712271           0.36329000
    #> Castanopsis.fargesii                 0.68282125           0.50626395
    #> Photinia.serrulata                   1.22684568           0.82326273
    #>                         Lithocarpus.glaber Syzygium.buxifolium
    #> Schima.superba
    #> Rhododendron.ovatum
    #> Cyclobalanopsis.glauca
    #> Daphniphyllum.oldhamii
    #> Loropetalum.chinensis
    #> Pinus.massoniana
    #> Rhododendron.latoucheae
    #> Vaccinium.bracteatum
    #> Lithocarpus.glaber
    #> Syzygium.buxifolium             0.19529939
    #> Castanopsis.tibetana            0.95103873          0.46091167
    #> Castanopsis.fargesii            0.52956851          0.38730279
    #> Photinia.serrulata              0.82685927          0.00000000
    #>                         Castanopsis.tibetana Castanopsis.fargesii
    #> Schima.superba
    #> Rhododendron.ovatum
    #> Cyclobalanopsis.glauca
    #> Daphniphyllum.oldhamii
    #> Loropetalum.chinensis
    #> Pinus.massoniana
    #> Rhododendron.latoucheae
    #> Vaccinium.bracteatum
    #> Lithocarpus.glaber
    #> Syzygium.buxifolium
    #> Castanopsis.tibetana
    #> Castanopsis.fargesii              0.70061396
    #> Photinia.serrulata                0.31177382           0.00000000  niche.width(datasample[,1:3], method = "shannon")
    #>   Castanopsis.eyrei Schima.superba Rhododendron.ovatum
    #> 1          2.003976        1.94466            1.776253