Message-ID: <0833E90D-A57B-4217-B1FC-7DE7C5B52C28@gmail.com>
Date: 2011-01-06T11:29:26Z
From: Chris Mcowen
Subject: Multiple subsets of data
Dear List,
I have a data frame called trait with roughly 800 species in, each species have 15 columns of information:
Species 1 2 3 etc..
a t y h
b f j u
c r y u
etc..
I then have another data frame called com with the composition of species in each region, there are 506 different communities:
community species
NA1102 a
NA1102 c
NA0402 b
NA0402 c
AT1302 a
AT1302 b
etc..
What i want to do is extract the information held in the first data frame for each community and save this as a new data frame.
Resulting in : -
community_NA1102
a t y h
c r y u
community_NA0402
b f j u
c r y u
Thanks in advance for any suggestions / code.