Dear Friends,

    Using package Vegan, I need to calculate Shannons Diversity index
and Pielou's Evenness for a set of 20 study areas. Each area is
represented by a matrix of 25 sample plots x tree species. The code is
as following, where data stands for the data matrix of any of the 20
areas:

S <- specnumber(data)
H <- diversity(data)
J <- H/log(S)

     I indexed the 20 areas by a column with the number of each of the
areas and have been trying to formulate a code to iterate this procedure
for each of the 20 areas and save the results in a table, but I have not
been successful. 

    Do anyone have a hint on how to do that?

    Thaks very much in advance,

    Sincerely,

    Alexandre

Dr. Alexandre F. Souza 
Programa de Pós-Graduação em Biologia: Diversidade e Manejo da Vida
Silvestre
Universidade do Vale do Rio dos Sinos (UNISINOS)
Av. UNISINOS 950 - C.P. 275, São Leopoldo 93022-000, RS  - Brasil
Telefone: (051)3590-8477 ramal 1263
Skype: alexfadigas
afso...@unisinos.br
http://www.unisinos.br/laboratorios/lecopop

-- 
Esta mensagem foi verificada pelo sistema de antiv�rus e
 acredita-se estar livre de perigo.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to