Hello all,



I have a *.csv file that looks like this (actual file is orders of magnitude
larger):



Site                  taxa                  no.ind

forest                LMA                1

forest                LCY                1

forest                SCO                1

meadow           LMA                2

meadow           LCY                1

meadow           PNT                 3



I am interested in, but have failed to create, code that efficiently
converts it to a site-by-taxa matrix or data frame that looks like this:



                        LMA    LCY    SCO    PNT

Forest              1          1          1          0

Meadow          2          1          0          3





With no repeating taxa names and zeros where a taxon is not listed for a
site.  Any help would be greatly appreciated.



Regards,



Drew Garey

Aquatic Ecoloy Lab Manager

Virginia Commonwealth University

	[[alternative HTML version deleted]]


