Hello, this is my first participation in the community. I'm very new to r and I'm trying to do something that I think should be simple but I haven't found the right key. I have this dataframe:
ggp <- data.frame( stringsAsFactors = FALSE, Month = c("01-2021", "02-2021", "03-2021", "04-2021"), Eur = c(4666395L, 6710095L, 8426865L, 7365811L), Tons = c(7677L, 11092L, 13930L, 11709L) )
I am trying to plot a graph with multiple lines in ggplot2:
ggp1 <- ggplot(ggp, aes(Month)) + geom_line(aes(y = Eur), colour = "red") + geom_line(aes(y = Tons), colour = "blue")
gives me this error:
geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic?
(actually with any code I've tried I get the same result)
I hope I have put my question correctly. Any hints on how to do it correctly? Thanks in advance