Skip to content

Commit

Permalink
Correct a bug to deal with rows/columns of 0
Browse files Browse the repository at this point in the history
This allows to deal properly labels when a species or a site have zero abundance. For instance, in doubs$fish. Before, labels where wrongly assigned
  • Loading branch information
sdray committed Oct 7, 2024
1 parent af1eeb3 commit 69227a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/score.coa.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@
oritab <- eval.parent(as.list(y$call)[[2]])
}
else oritab <- eval.parent(as.list(x$call)[[2]])
l.names <- rownames(oritab)
c.names <- colnames(oritab)
l.names <- rownames(oritab)[rowSums(oritab) > 0]
c.names <- colnames(oritab)[colSums(oritab) > 0]
oritab <- as.matrix(oritab)
f1 <- function(x, oritab, xax){
a <- x$co[col(oritab), xax]
Expand Down

0 comments on commit 69227a1

Please sign in to comment.