Thanks for your help! You're great and you are helping me a lot! I have one more question (sorry if I am being awkward.
How could I include data from another dataframe in the same graph? Just adding another geom_point?
I guess no cause I am working now with the new dataframe with the MONTH and DAY combined.
Here I show you how I addapted the code you gave me:
SO2combined2019 <- data.frame (
month = rep(MES),
day = rep(DIA),
so2 = (GRANADA_NORTE_19$SO2)
)
SO2combined2019 %>%
mutate(date = ymd(paste("2019", month, day, sep = "-"))) %>%
drop_na() %>%
ggplot(aes(x = date, y = so2)) +
geom_point(mapping = aes(color=so2)) +
scale_x_date(date_breaks = "10 days",
labels = label_date_short(format = c(NA, "%B", "%d", "%H:%M")),
expand = c(0.005,0.005))
month= rep(MES) --> is my variable MONTH in my dataframe as the same as DIA=day.
And in case I want to select only 4 months for example, is just to type this? :
SO2combined2019 <- data.frame (
month = rep(MES=1:4),
day = rep(DIA),
so2 = (GRANADA_NORTE_19$SO2)
)