Excuse me for the mistake. I have add a variable similar to the one I want to represent with the line.
df <-tibble(year = c(rep("2012", 12), rep("2013", 12), rep("2014", 12), rep("2015", 12)),
month = c("Jan", "Feb", "Mar", "Apr", "Mag", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"Jan", "Feb", "Mar", "Apr", "Mag", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"Jan", "Feb", "Mar", "Apr", "Mag", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"Jan", "Feb", "Mar", "Apr", "Mag", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),
species = c(rep("A", 20), rep("B", 18), rep("C", 5), rep("D", 5)),
color = c("blue", "red", "green", "yellow", "purple", "blue", "red", "green", "yellow", "purple", "blue", "red", "green", "yellow", "purple", "blue", "red", "green", "yellow", "purple", "blue", "red", "green", "yellow", "purple", "blue", "red", "green", "yellow", "purple", "blue", "red", "green", "yellow", "purple", "blue", "red", "green", "yellow", "purple", "blue", "red", "green", "yellow", "purple", "blue", "red", "green"),
value = runif(48)*100,
value_2 = runif(48)*100)
When i try to represent the line with geom_line() it doesn't work...
I would like to unite the dots with a line, but I don't know how I can do that.
df %>%
ggplot() +
geom_bar(aes(x = month, y = value), stat = "identity") +
facet_wrap(~ year) +
geom_point(aes(x = month, y = value_2))
Thank you for the help and for the patience.