Is there a good way to measure smoothness of a time series in R? For example,
-1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 1.0
is much smoother than
-1, 0.8, -0.6, 0.4, -0.2, 0, 0.2, -0.4, 0.6, -0.8, 1.0
although they have same mean and standard deviation. It would be cool if there is a function to give me a smooth score over a time series.