
Lock-Step Dissimilarity Analysis of Time Series Lists
Source:R/distantia_lock_step.R
distantia_lock_step.Rd
Minimalistic but slightly faster version of distantia()
to compute lock-step dissimilarity scores.
Arguments
- tsl
(required, time series list) list of zoo time series. Default: NULL
- distance
(optional, character vector) name or abbreviation of the distance method. Valid values are in the columns "names" and "abbreviation" of the dataset distances. Default: "euclidean".
Value
data frame:
x
: time series name.y
: time series name.distance
: name of the distance metric.psi
: psi dissimilarity of the sequencesx
andy
.
See also
Other distantia:
distantia()
,
distantia_plot()
,
distantia_time_warp()
Examples
#load fagus_dynamics as tsl
#global centering and scaling
tsl <- tsl_initialize(
x = fagus_dynamics,
name_column = "name",
time_column = "time"
) |>
tsl_transform(
f = f_scale_global
)
if(interactive()){
tsl_plot(
tsl = tsl,
guide_columns = 3
)
}
#lock-step dissimilarity analysis
df_ls <- distantia_lock_step(
tsl = tsl,
distance = "euclidean"
)
#focus on the important details
df_ls[, c("x", "y", "psi")]
#> x y psi
#> 2 Germany Sweden 0.857670
#> 1 Germany Spain 1.306133
#> 3 Spain Sweden 1.470850