Skip to content
Merged

Dev #84

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/CodeAndRoll2.R
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,7 @@ get_max_colname_per_row <- function(
if (na.remove) mat[is.na(mat)] <- -Inf

# Function to find the maximum indices (1 or more ) of values in a vector
.which.max.multi <- function(x) which(x == max(x, na.rm = TRUE)) # unique formatting needed to avoid pattern matching.
.which.max.multi = function(x) which(x == max(x, na.rm = TRUE)) # unique formatting needed to avoid pattern matching.

# Apply function to find the maximum indices to each row and return appropriate result
max_indices_per_row <- lapply(seq_len(nrow(mat)), function(i) .which.max.multi(mat[i, ]))
Expand Down