This is my data . I want to create multiple line charts for the different variables . The long form of the data is being created using "melt" from "reshape2" package .
The current code I am using is :
ggplot(data = agg_melt_p, aes(x=Cat, y=value)) + geom_line(aes(colour=variable))
This gives me the following error: geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic?
Data:
Cat <- c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4)
variable <- c("IL_1_Flag_p", "IL_1_Flag_p", "IL_1_Flag_p", "IL_1_Flag_p", "IL_2_Flag_p", "IL_2_Flag_p", "IL_2_Flag_p","IL_2_Flag_p", "IL_3_Flag_p", "IL_3_Flag_p", "IL_3_Flag_p", "IL_3_Flag_p", "IL_4_Flag_p", "IL_4_Flag_p", "IL_4_Flag_p", "IL_4_Flag_p", "IL_5_Flag_p", "IL_5_Flag_p", "IL_5_Flag_p", "IL_5_Flag_p")
value <- c(21,17,16,210,20,17,15,189,20,17,15,188,19,17,15,188,20,17,15,194)
agg_melt_p <- data.frame(cat, variable, value)


group = variablein the geom line aes?