Example data:
df <- data.frame(Mean1=c(12,15,17,14,16,18,16,14),Lower1=c(8,11,13,7,15,12,12,11),Upper1=c(16,18,21,21,17,24,20,17),Mean2=c(13,16,18,15,17,19,17,15),Lower2=c(9,12,14,8,16,13,13,12),Upper2=c(17,19,22,22,18,25,21,18))
rownames(df) <- c(1,2,3,4,5,6,7,8)
I can produce a forest plot with Mean1 Lower1 and Upper1 from df:
ggplot(df, aes(y = row.names(df), x = df$Mean1)) +
geom_point(size = 4) +
geom_errorbarh(aes(xmax = df$Upper1, xmin = df$Lower1))
So my question is: How can I include Mean2 Lower2 and Upper2 from df to the plot so that both means from each observation point (rows) are represented as pairs with their respective error bars? So the output would be a similar forest plot, but with both means and error limits from each observation points displayed in pairs. I hope this makes sense.
I haven't tried anything because I simply don't know where to start.
I this possible to perform without disrupting the structure of the data frame?