[R] rbind help
James W. MacDonald
jmacdon at med.umich.edu
Tue May 12 18:52:20 CEST 2009
> 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
> 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),
I would do the conversion in place:
striae$orientation <- ifelse(striae$orientation > 108,
striae$orientation - 180, striae$orientation)
> Not being a regular R user I suspect the syntax is easy when you know it!!
> Any help much appreciated.
> Best wishes
James W. MacDonald, M.S.
University of Michigan
Department of Human Genetics
1241 E. Catherine St.
Ann Arbor MI 48109-5618
More information about the R-help