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

Prevent warning "the standard deviation is zero" #23

Open
llrs opened this issue Dec 10, 2018 · 0 comments
Open

Prevent warning "the standard deviation is zero" #23

llrs opened this issue Dec 10, 2018 · 0 comments
Assignees

Comments

@llrs
Copy link
Owner

llrs commented Dec 10, 2018

The functions should check and clean if a variable is all 0 or equal:
Should be needed on tau.estimate (with a warning) and sgcca and rgcca

A <- lapply(A, function(x) {
  k <- unlist(apply(x, 2, sd, na.rm = FALSE))
  x[, k != 0]}
)
@llrs llrs self-assigned this Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant