How to calculate first derivative of time series

后端 未结 3 684
梦谈多话
梦谈多话 2021-01-31 20:16

I would calculate the first derivative (dpH/dtime) of time series using two variables, time and pH.

Are there any kind of functions to do this

3条回答
  •  独厮守ぢ
    2021-01-31 20:39

    Assuming pH and time are plain vectors try this:

    library(pspline)
    predict(sm.spline(time, pH), time, 1)
    

提交回复
热议问题