Skip to content

Error in cor.mtest when there are not enough finite observations #284

@Gael-Hammer

Description

@Gael-Hammer

cor.mtest is basically a loop calling cor.test(x = mat[, i], y = mat[, j], ...)
When combinations of x and y do not have enough data, cor.test fails and thus cor.mtest.
Please catch this error, maybe with something along these lines:

      if(sum(!is.na(mat[,i]*mat[,j])) > 2) {
        tmp = cor.test(x = mat[, i], y = mat[, j], ...)
      } else {
        tmp <- list(p.value = NA, conf.int = NULL)
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions