(C++) Sum Distances Between Consecutive Samples in a Time Series
Source:R/RcppExports.R
auto_distance_cpp.Rd
Computes the cumulative sum of distances between consecutive samples in a univariate or multivariate time series. NA values should be removed before using this function.
See also
Other Rcpp_auto_sum:
auto_sum_cpp()
,
auto_sum_full_cpp()
,
auto_sum_path_cpp()
,
subset_matrix_by_rows_cpp()
Examples
#simulate a time series
x <- zoo_simulate()
#compute auto distance
auto_distance_cpp(
x = x,
distance = "euclidean"
)
#> [1] 10.61317