Skip to content

Re-post data format question (apologies)

4 messages · Drew Garey, Sarah Goslee, Marc Schwartz +1 more

#
There are various ways, but for simple convenience that's exactly
the job that crosstab() in ecodist was written for.

Sarah
On Sat, Feb 7, 2009 at 2:47 PM, Drew Garey <corydalus at gmail.com> wrote:

  
    
#
on 02/07/2009 01:47 PM Drew Garey wrote:
See ?xtabs

If your data is in a data frame called 'DF':
Site taxa no.ind
1 forest  LMA      1
2 forest  LCY      1
3 forest  SCO      1
4 meadow  LMA      2
5 meadow  LCY      1
6 meadow  PNT      3
taxa
Site     LCY LMA PNT SCO
  forest   1   1   0   1
  meadow   1   2   3   0

HTH,

Marc Schwartz