Skip to content

Commit

Permalink
support interperting marix/array
Browse files Browse the repository at this point in the history
  • Loading branch information
mattansb committed Dec 6, 2024
1 parent 4371a7a commit 6061bab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/interpret.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ interpret.numeric <- function(x, rules, name = attr(rules, "rule_name"),

if (length(x_tran) > 1) {
out <- vapply(x_tran, .interpret, rules = rules, FUN.VALUE = character(1L))
if (is.matrix(x_tran) || is.array(x_tran)) {
out <- structure(out, dim = dim(x_tran), dimnames = dimnames(x_tran))
}
} else {
out <- .interpret(x_tran, rules = rules)
}
Expand Down

0 comments on commit 6061bab

Please sign in to comment.