1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 16:22:10 +02:00

(v0.7.0.9001) new pathovars, small fixes

This commit is contained in:
2019-06-07 22:47:37 +02:00
parent 04c75e8e36
commit f02679fb63
83 changed files with 686 additions and 583 deletions

View File

@ -414,15 +414,15 @@ first_isolate <- function(x,
if (length(x) == 1) {
return(TRUE)
}
indices = integer(0)
start = x[1]
ind = 1
indices[ind] = ind
indices <- integer(0)
start <- x[1]
ind <- 1
indices[ind] <- ind
for (i in 2:length(x)) {
if (as.numeric(x[i] - start >= episode_days)) {
ind = ind + 1
indices[ind] = i
start = x[i]
if (isTRUE(as.numeric(x[i] - start) >= episode_days)) {
ind <- ind + 1
indices[ind] <- i
start <- x[i]
}
}
result <- rep(FALSE, length(x))