library(tgcd)
data(Refglow)
x <- Refglow$x009[,1]
y <- Refglow$x009[,2]
y0 <- savgol(y, drv=0)
dy <- savgol(y, drv=1)
plot(x, y, type="p", pch=21, bg="black")
points(x, y0, type="l", col="blue", lwd=2)
plot(x, dy, type="l", col="blue", lwd=2)
abline(h=0, lty="dashed", col="red", lwd=2)
Run the code above in your browser using DataLab