[R-meta] Meta package - Bubble plot subgroup colours

Guido Schwarzer @c @ending from imbi@uni-freiburg@de
Tue Sep 11 10:50:06 CEST 2018

Am 11.09.18 um 10:31 schrieb Gerta Ruecker:

> [...]
> Of course you may set colours as you like. For the given example, you 
> may write, e.g.,
> cols<- c("green","violet")

This would result in a vector

"green" "violet" "green" "violet" "green"

instead of the (in this example) correct colours

"violet" "violet" "green" "green" "violet"

The following R command should do the trick:

cols <- (Fleiss93cont$region == "Europe") + 1
cols <- as.character(factor(cols, labels = c("green", "violet")))

Best wishes,

More information about the R-sig-meta-analysis mailing list