[R] rbind help

MikSmith mike at hsm.org.uk
Tue May 12 12:04:59 CEST 2009


Hi

I have a dataset of orientation and elevation in a dataframe which I am
plotting in circular. Orientation is on the range 0-360, however I need to
reduce this to 0-180 as the values over 180 are not necessarily correct. I
can do

striae$orientation[striae$orientation>180]-180)

to extract these values, but I then want to combine them back in to the
original dataframe (with the elevation values). I assume rbind is the thing
to use and have tried something like:

test <- rbind((striae$orientation[striae$orientation>180]-180),
(striae$orientation[striae$orientation<=180]))

Not being a regular R user I suspect the syntax is easy when you know it!!
Any help much appreciated.

Best wishes

mike
-- 
View this message in context: http://www.nabble.com/rbind-help-tp23499705p23499705.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list