I'm trying to create a panel of paired boxplots using ggpaired. I have 2 sets of scores from 7 measures across 6 participants. When I use ggpaired to plot just 1 measure I can get it to work with no problem:
p <- ggpaired(data, x = "group", y = "presenting",
xlab="Class Format",
ylab="Prevalence",
main="Presenting",
line.color = "black", line.size = 0.4)
p
I can't get this to work across multiple measures using facet.by:
p <- ggpaired(ibp, x = "group", y = "score",
line.color = "gray", line.size = 0.4,
facet.by = "cluster", short.panel.labs = FALSE)
p
I get the following error code in R: geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic?
I'm assuming the issue is how I have the data set up. I can only get the pairing to work with the data set up in the excel sheet on the left. I can only figure out how to do facet with the data set up in the excel sheet on the right.
Any suggestions on how to organize the data to get both the pairing and facets to work? Thank you!