You might want to start with, stats::derivor diff.ts, as Matt L. suggested. Just keep in mind that my teacher told all his students: digital differentiation is known as the “error multiplier.”
EDIT:
, , , . , , - .
, . , predict.spline. , , , , , .