Remove series of more than k succeeding NA's in x, y, and x_values.
This function is recommended before performing a permutation distancing test.
Usage
do_remove_NA_series_above_k(x, y, k, x_values = NULL)
Value
List with the modified x, y, x_values:
x = factor vector with conditions (e.g., "A" and "B").
y = vector with observed values.
x_values = vector with distance (time markers) between observations x,y.
Arguments
x
factor vector to indicate conditions or phases (e.g., "A" and "B")
y
numeric vector with the observed y-values
k
maximum allowed number of NA's
x_values
numerical vector with distance (time markers) between observations