4
I wonder how I can get the points that are generated by my curve. I’m having trouble getting the results of my last code statement.
In addition, I got the upper and lower points of the curve, but I would also like to get the first and last point of the curve. Got to get the first and last point of my turn?
I tried to use some concepts like head or Summary, but they don’t work for my last instruction. My code is as follows::
plot(dados.frame)
dados.loess <- loess(duracao ~date_time, data=dados.frame)
xl <- with(dados.frame, seq(min(date_time),max(date_time), (max(date_time) - min(date_time))/1000))
y.predict <- predict(dados.loess, xl)
lines(xl,y.predict)
infl <- c(FALSE, diff(diff(y.predict)>0)!=0)
points(xl[infl ], y.predict[infl ], col="Red", pch=19, cex=1.25)
Thank you so much!!! The two answers helped me a lot!
– Samara