[R-sig-eco] singletons and doubletons in vegan

Canning-Clode, Joao Canning-ClodeJ at si.edu
Wed Feb 1 15:24:04 CET 2012


Thank you, I think this is what I need. I need to assess the number of species represented by exactly one sample (singletons or uniques) and the number of species represented by exactly 2 samples (duplicates).

cheers

J
João Canning Clode, Ph.D
Research Associate
Smithsonian Environmental Research Center
647 Contees Wharf Road
Edgewater, MD 21037

Email: canning-clodej at si.edu<mailto:canning-clodej at si.edu>
Web: www.canning-clode.com<http://www.canning-clode.com>

On Feb 1, 2012, at 12:48 PM, Gavin Simpson wrote:

On Wed, 2012-02-01 at 07:32 -0500, Canning-Clode, Joao wrote:
Hi all,

I am running species accumulation curves for several data-sets, and am
also playing with some estimators with this function in vegan:

SF.estimators<-poolaccum(SF.data,permutations=1000)
SF.estimators # shows data for Sobs, Chao, both Jacks and bootstrap
plot(SF.estimators) # illustrates graphs for all estimators
summary(SF.estimators,display="jack2") # gives jack2 stats

Does any of you know how can I get the info about singletons and doubletons?

What info do you want?

Working out which spp are singletons and doubletons from the input data
is quite simple for the entire pool of samples (he says, hoping I i]
understood and ii] got this right ;-):

cs <- colSums(SF.data > 0)
singlet <- cs == 1L
doublet <- cs == 2L

singlet[which(singlet)]
doublet[which(doublet)]

E.g.

## Load example data set from vegan
data(BCI)

## compute the column sums
cs <- colSums(BCI > 0)

## logicals for singleton and doubleton
singlet <- cs == 1L
doublet <- cs == 2L

## which species are...
singlet[which(singlet)]
doublet[which(doublet)]

## number of singletons and doubletons...
sum(singlet)
sum(doublet)

HTH

G

best wishes

João

João Canning Clode, Ph.D
Research Associate
Smithsonian Environmental Research Center
647 Contees Wharf Road
Edgewater, MD 21037

Email: canning-clodej at si.edu<mailto:canning-clodej at si.edu><mailto:canning-clodej at si.edu>
Web: www.canning-clode.com<http://www.canning-clode.com><http://www.canning-clode.com>

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org<mailto:R-sig-ecology at r-project.org>
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk<http://gavin.simpsonATNOSPAMucl.ac.uk>
Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-sig-ecology mailing list