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

2012-02-01 Thread Canning-Clode, Joao
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?

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-clo...@si.edumailto:canning-clo...@si.edu
Web: www.canning-clode.comhttp://www.canning-clode.com

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


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

2012-02-01 Thread Gavin Simpson
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-clo...@si.edumailto:canning-clo...@si.edu
 Web: www.canning-clode.comhttp://www.canning-clode.com
 
 ___
 R-sig-ecology mailing list
 R-sig-ecology@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
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


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

2012-02-01 Thread Jari Oksanen

On 01/02/2012, at 14:34 PM, 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 information do you need? If you want to know the names of singleton and 
doubleton *occurrences* on plots, you can use (with the BCI data in vegan):

freq - colSums(BCI0)
which(freq==1)
which(freq==2)

If you want to something similar for counts (individuals), you just change the 
command to find the 'freq'.

If you want to know how many singleton and doubleton species you have in each 
of your sampling units, you can use

rowSums(BCI[, freq==1]  0)
rowSums(BCI[, freq==2]  0)

If you want to know how may species have exactly one individual (stem) in a 
sampling unit, just use

rowSums(BCI==1)

Was the information you asked among these things, or do you want to have 
something more?

Cheers, Jari Oksanen
-- 
Jari Oksanen, Dept Biology, Univ Oulu, 90014 Finland
jari.oksa...@oulu.fi, Ph. +358 400 408593, http://cc.oulu.fi/~jarioksa

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology