[R] How to calculate the index "the number of species combinations"?
Sarah Goslee
sarah.goslee at gmail.com
Sun Jul 8 00:56:32 CEST 2007
It should be the number of unique sites. In this case, the number of
unique columns in the data frame. See ?unique. (Interestingly,
convention is usually that species are columns and sites are rows.)
For your sample data you only see 10 of the 2^17 possible combinations
of 17 species (not 2n).
Sarah
On 7/7/07, Zhang Jian <jzhang1982 at gmail.com> wrote:
> I want to analyze the co-occurrence of some species. In some papers, the
> authors said that the index"the number of species combinations (COMBO)" is a
> good index. I try to calculate the index by R language. But I can not get
> the right value. I think that I do not understand the concept of the index
> because my english is not good.
>
> The concept:
> *The number of species combinations *This index scans the columns of the
> presence-absence matrix and keeps track of the number of unique species
> combinations that are represented in different sites. For an assemblage of n
> species, there are 2n possible species combinations, including the
> combination of no species being present (Pielou and Pielou 1968). In most
> real matrices, the number of sites (= columns) is usually substantially less
> than 2n, which places an upper bound on the number of species combinations
> that can be found in both the observed and the simulated matrices.
>
> Presence-absence Data (Each row represents different species and each column
> represents a different site. A "1" indicates a species is present at a
> particular site, and a "0" indicates that a species is absent from a
> particular site):
> Species Cuba Hispaniola Jamaica Puerto_Rico Guadeloupe Martinique Dominica
> St._Lucia Barbados St._Vincent Grenada Antigua St._Croix Grand_Cayman
> St._Kitts Barbuda Montserrat St._Martin St._Thomas
> Carduelis_dominicensis 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> Loxia_leucoptera 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> Volatinia_jacarina 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
> Sporophila_nigricollis 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
> Melopyrrha_nigra 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
> Loxigilla_portoricensis 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> Loxigilla_violacea 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> Loxigilla_noxis 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0
> Melanospiza_richardsoni 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
> Tiara_olivacea 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
> Tiara_bicolor 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1
> Tiara_canora 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> Loxipasser_anoxanthus 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> Saltator_albicollis 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0
> Torreornis_inexpectata 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> Ammodramus_savannarum 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> Zonotrichia_capensis 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>
--
Sarah Goslee
http://www.functionaldiversity.org
More information about the R-help
mailing list