I have a dataframe as follows:
I want to apply ggpaired for paired comparison. My R code is as follows:
Data$State<-factor(Data$State, levels = c("PDSS", "MSDD","HCP"))
Data$Condition<-factor(Data$Condition, levels = c("SM", "DM"))
ggpaired(Data, x = "Condition", y = "Value",color = "Condition",line.color = "grey", line.size = 0.4, palette = "jco",facet.by = "State", short.panel.labs = FALSE)
I am getting an error as follows:
geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic?
My output file looks like this.
How should I have all the paired lines? Any help is highly appreciated!
Thanks, Vrutang