I want to merge the three datasets grouped and obtain a graph with only two boxes, 1 for A and 1 for B. Can you suggest how to get that?
I\'m tryng to create a group
You should use ggplot2
ggplot() +
geom_boxplot(data = df, mapping = aes(col_name, value, fill=index)) +
theme( axis.text.x = element_blank()) +
geom_segment(data=hline1, mapping=aes(x=1, y=-0.5, xend=3, yend=-0.5), size=2) +
annotate("text", x = 2, y = -1, label = "A") +
geom_segment(data=hline1, mapping=aes(x=4, y=-0.5, xend=6, yend=-0.5), size=2) +
annotate("text", x = 5, y = -1, label = "B")