# Niche width

`niche.width.Rd`

Compute niche width for all the species in a community.

    niche.width(mat, method = c("shannon", "levins"))

## Arguments

mat | A community matrix with columns representing species, and rows representing plots.
method | Character string showing the name of the index.

## Value

A vetor containing niche width for all the species in the community.

## References

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

## Author

Jinlong Zhang jinlongzhang01@gmail.com

## See also

`niche.overlap` for niche overlap

## Examples

    data(datasample)
    niche.width(datasample, method = "levins")
    #>   Castanopsis.eyrei Schima.superba Rhododendron.ovatum Cyclobalanopsis.glauca
    #> 1          6.969601       6.476894            5.223085               3.463039
    #>   Daphniphyllum.oldhamii Loropetalum.chinensis Pinus.massoniana
    #> 1               4.344667              4.430471         3.460728
    #>   Rhododendron.latoucheae Vaccinium.bracteatum Lithocarpus.glaber
    #> 1                4.449799             3.103858            3.02749
    #>   Syzygium.buxifolium Castanopsis.tibetana Castanopsis.fargesii
    #> 1            2.519305             1.744575             1.948961
    #>   Photinia.serrulata
    #> 1           1.951351niche.width(datasample, method = "shannon")
    #>   Castanopsis.eyrei Schima.superba Rhododendron.ovatum Cyclobalanopsis.glauca
    #> 1          2.003976        1.94466            1.776253               1.368882
    #>   Daphniphyllum.oldhamii Loropetalum.chinensis Pinus.massoniana
    #> 1               1.584789              1.649535         1.389039
    #>   Rhododendron.latoucheae Vaccinium.bracteatum Lithocarpus.glaber
    #> 1                 1.60508             1.233863           1.224677
    #>   Syzygium.buxifolium Castanopsis.tibetana Castanopsis.fargesii
    #> 1            1.007771            0.6180418            0.6799956
    #>   Photinia.serrulata
    #> 1          0.6806295