Ggplot show trend line in linear model

library(plotly)

airquality_sept <- airquality[which(airquality$Month == 9),] airquality_sept$Date <- as.Date(paste(airquality_sept$Month, airquality_sept$Day, 1973, sep = "."), format = "%m.%d.%Y") View(airquality_sept) ggplot(airquality_sept, aes(x = Date, y = Wind)) + geom_bar(stat = "identity") + geom_smooth(method = "lm")+ theme(axis.text.x = element_text(angle = 45, vjust = 0.5))

Leave a Reply

Your email address will not be published. Required fields are marked *