Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rev_jack breaks when v has more than one element #345

Open
pepbioalerts opened this issue Aug 9, 2023 · 0 comments
Open

rev_jack breaks when v has more than one element #345

pepbioalerts opened this issue Aug 9, 2023 · 0 comments

Comments

@pepbioalerts
Copy link

#Issue in rev_jack

Function breaks when length(v)>2
if (v < median(x))

Possible solution using a for loop
if (any(z > t1)) {
f <- which(z > t1)
v <- x[f]
for (vt in v) {
if (vt < median(x)) {
xa <- (v2 <= vt) * 1
out <- out + xa
}
if (vt > median(x)) {
xb <- (v2 >= vt) * 1
out <- out + xb
}
}
} else {
out <- out
}

@pepbioalerts pepbioalerts changed the title But in rev_jack when v has more than one element rev_jack breaks when v has more than one element Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant