I would calculate the first derivative (dpH/dtime) of time series using two variables, time and pH.
time
pH
Are there any kind of functions to do this in R or should I compute an extra function to do this?