diff --git a/R/functions_corr.R b/R/functions_corr.R index 8dedd59..332ebc8 100644 --- a/R/functions_corr.R +++ b/R/functions_corr.R @@ -107,6 +107,7 @@ forcejump <- function(data_L2, force, n_days = 5) { dplyr::mutate(diff = c(NA, diff(value, lag = 1))) %>% dplyr::select(ts, diff) %>% dplyr::right_join(., data_L2, by = "ts") %>% + dplyr::arrange(ts) %>% dplyr::select(diff) %>% unlist(., use.names = FALSE)