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

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed Feb 1 13:48:10 CET 2012


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>
> Web: www.canning-clode.com<http://www.canning-clode.com>
> 
> _______________________________________________
> R-sig-ecology mailing list
> 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
 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