[R] Separating parts of a column of data in R

Carrot Top liseypoo_4 at hotmail.com
Fri Jul 16 01:09:05 CEST 2010


Hi there,
I am fairly new to R and I have been trying to figure out how to separate a
column of substrate data that I have into separate parts using R.
An example of my data looks like this is:
gmtTime   Classification ClassValue   Species       Count
1449         Sand            30            
1449         Mud             70          Brittle Star       1
1449         Mud             70          Brittle Star       1
1563         Cobble          5
1563         Boulder         30
1563         Mud             65         Sea Anemone     2
1563         Mud             65         Sea Anemone     1
This data was collected by looking at ROV video data and for each gmtTime,
the substrate composition (adding up to 100) and the species were recorded. 
The problem is that all of the substrate data is in the same column and I
would like it to be separated under heading such as "Sand" "Cobble" etc. 
Another problem is that for each species sighting, the substrate doesn't
always add to 100%.  If you look at the first example (gmtTime=1449), you
see Sand 30% only once but Mud 70% twice.  For each gmtTime that is the
same, the substrate composition will be exactly the same, so I was wondering
if anyone knew how to extract that Sand 30 and Mud 70 and apply it to both
of the species under the gmtTime 1449 for example?  Any suggestions would be
much appreciated....
Thanks for your time!


-- 
View this message in context: http://r.789695.n4.nabble.com/Separating-parts-of-a-column-of-data-in-R-tp2290793p2290793.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list