Quadratic regression line using R plotly
问题 I am quite new to R and really new in plotly . I am trying to plot a quadratic (i.e. 2nd-degree polynomial) regression line. Once some prices vs years, and once the same prices vs a list of certain integer numbers (which can be the same), let's say scores. The data in this example are price = c(995, 675, 690, 600, 612, 700, 589, 532, 448, 512, 537, 560) score = c(89, 91, 88, 89, 91, 91, 89, 93, 83, 91, 91, 90) year = c(2005:2016) The first fit works well by coding enter code here qfit1 <- lm