hi,
I have this code:
p <- ggplot(dataset, aes(x =i, y = um)) +
geom_point()
p <- p + geom_line(aes(y = EXPMEDIA, colour = "EXP"))+ geom_line(aes(y = simple, colour = "simple"))
p <- p + scale_y_continuous(sec.axis = sec_axis(~.*1, name = ""))
p<- p + scale_colour_manual(values = c("blue", "red"))
p <- p + labs(y = "UMIDADE ",
x = "DATES ",
colour = "Legenda")
p <- p + theme(legend.position = c(0.955, 0.95)) +
ggtitle(" Exponential Moving Average ")
p
I need plot in this graphic the last value of last<=tail(dataset$EXPMEDIA, n=1) how i can plot this value in the graphic ?
thank you !!