Re: [R] function for cumulative occurrence of elements

From: Mrs Karen Kotschy <karen_at_biology.biol.wits.ac.za>
Date: Tue 05 Jul 2005 - 08:42:47 EST

Hi Steven

Are you aware of the package "vegan" for community ecology? There is a function in this package called specaccum, which calculates species accumulation curves for you. Various methods can be specified, including "random".

I must admit I have not used this particular function (yet!) but it seems like it could be useful to you.

Regards
Karen



Karen Kotschy
Centre for Water in the Environment
University of the Witwatersrand
Johannesburg
South Africa

On Tue, 28 Jun 2005, Steven K Friedman wrote:

>
> Hello,
>
> I have a data set with 9700 records, and 7 parameters.
>
> The data were collected for a survey of forest communities. Sample plots
> (1009) and species (139) are included in this data set. I need to determine
> how species are accumulated as new plots are considered. Basically, I want
> to develop a species area curve.
>
> I've included the first 20 records from the data set. Point represents the
> plot id. The other parameters are parts of the information statistic H'.
>
> Using "Table", I can construct a data set that lists the occurrence of a
> species at any Point (it produces a binary 0/1 data table). From there it
> get confusing, regarding the most efficient approach to determining the
> addition of new and or repeated species occurrences.
>
> ptcount <- table(sppoint.freq$species, sppoint.freq$Point)
>
> From here I've played around with colSums to calculate the number of species
> at each Point. The difficulty is determining if a species is new or
> repeated. Also since there are 1009 points a function is needed to screen
> every Point.
>
> Two goals are of interest: 1) the species accumulation curve, and 2) an
> accumulation curve when random Points are considered.
>
> Any help would be greatly appreciated.
>
> Thank you
> Steve Friedman
>
>
> Point species frequency point.list point.prop log.prop
> point.hprime
> 1 7 American elm 7 27 0.25925926 -1.3499267
> 0.3499810
> 2 7 apple 2 27 0.07407407 -2.6026897
> 0.1927918
> 3 7 black cherry 8 27 0.29629630 -1.2163953
> 0.3604134
> 4 7 black oak 1 27 0.03703704 -3.2958369
> 0.1220680
> 5 7 chokecherry 1 27 0.03703704 -3.2958369
> 0.1220680
> 6 7 oak sp 1 27 0.03703704 -3.2958369
> 0.1220680
> 7 7 pignut hickory 1 27 0.03703704 -3.2958369
> 0.1220680
> 8 7 red maple 1 27 0.03703704 -3.2958369
> 0.1220680
> 9 7 white oak 5 27 0.18518519 -1.6863990
> 0.3122961
> 10 9 black spruce 2 27 0.07407407 -2.6026897
> 0.1927918
> 11 9 blue spruce 2 27 0.07407407 -2.6026897
> 0.1927918
> 12 9 missing 12 27 0.44444444 -0.8109302
> 0.3604134
> 13 9 Norway spruce 8 27 0.29629630 -1.2163953
> 0.3604134
> 14 9 white spruce 3 27 0.11111111 -2.1972246
> 0.2441361
> 15 12 apple 2 27 0.07407407 -2.6026897
> 0.1927918
> 16 12 black cherry 1 27 0.03703704 -3.2958369
> 0.1220680
> 17 12 black locust 1 27 0.03703704 -3.2958369
> 0.1220680
> 18 12 black walnut 1 27 0.03703704 -3.2958369
> 0.1220680
> 19 12 lilac 3 27 0.11111111 -2.1972246
> 0.2441361
> 20 12 missing 2 27 0.07407407 -2.6026897
> 0.1927918
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jul 05 08:47:19 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:12 EST