I have not been able to find anything useful (except loads of information about Excel) on how to create a 2nd order trendline in a scatter plot using R. I did read one post that was way over my head (https://stats.stackexchange.com/questions/71187/getting-a-second-order-polynomial-trend-line-from-a-set-of-data).
A <- c(0, 5.4, 7.7, 9.4, 10.9, 12.2, 13.4, 14.5, 15.5, 16.4,
17.3)
B <- c(0, 0.12, 0.37, 0.49, 0.62, 0.87, 1.11, 1.3, 1.6, 1.8,
2)
df <- data.frame(A, B)
ggplot(data = df) + geom_point(mapping = aes(x = A, y = B)) +
labs(title = "H1") + theme(plot.title = element_text(hjust = 0.5))
This is what I want (used Excel - not with the same data).