Skip to content

Commit

Permalink
rowSums
Browse files Browse the repository at this point in the history
  • Loading branch information
ms609 committed Apr 3, 2024
1 parent 4e77ae0 commit 5752732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/length_range.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ MinimumLength.numeric <- function (x, compress = NA) {
repeat {
tokens <- tokens[!duplicated(tokens), , drop = FALSE]
unambiguous <- colSums(tokens) == 1
tokenNecessary <- apply(tokens[, unambiguous, drop = FALSE], 1, any)
tokenNecessary <- rowSums(tokens[, unambiguous, drop = FALSE]) > 0
statesRemaining <- !unambiguous
statesRemaining[statesRemaining] <- colSums(
tokens[tokenNecessary, statesRemaining, drop = FALSE]) == 0
Expand Down

0 comments on commit 5752732

Please sign in to comment.