View source: R/do_remove_NA_series_above_k.R
do_remove_NA_series_above_k | R Documentation |
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.
do_remove_NA_series_above_k(x, y, k, x_values = NULL)
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 |
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.
pdt::do_remove_NA_series_above_k(as.factor(c("A","A","A","B","B","B")), c(1.1,NA,NA,7.1,8.3,9.8), 1, c(1,2,4,5,6,8))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.