[R] reorder breaking by half

avilella avilella at gmail.com
Fri Jun 6 19:02:40 CEST 2008


Hi,

I want to reorder the colors given by rainbow(7) so that the last half
move to the first 4.

For example:

> ci=rainbow(7)
> ci
[1] "#FF0000FF" "#FFDB00FF" "#49FF00FF" "#00FF92FF" "#0092FFFF"
"#4900FFFF"
[7] "#FF00DBFF"

I would like "#FF0000FF" "#FFDB00FF" "#49FF00FF" to be at the end of
ci, and the rest to be at the beginning.

How can I do that?



More information about the R-help mailing list