Skip to content
Prev 180044 / 398502 Next

rbind help

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