Boxplot with Groups

Hi fellow R enthusiasts,

I am attempting to create a box plot in ggplot2 with groups such as the one in the attached image.

I was wondering if someone could help me with the code, it would much appreciated.

ID year group sex PSG CN
8772 2012 grilse f 1.0438608 20 2.339688 1.0418864



One way is to use facet_wrap("year", nrow = 1, strip.position = "bottom") to create subplots by year. You can then remove the space between them.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.