Skip to content

Commit

Permalink
fix for multivaroate
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jun 30, 2024
1 parent 174ec9b commit de9c471
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions R/find_transformation.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,17 @@ find_transformation.default <- function(x, ...) {
if (is.null(x) || is.data.frame(x) || !is_model(x)) {
return(NULL)
}
rv <- find_terms(x)[["response"]]
find_transformation(rv)

# sanity check for multivariate models
if (is_multivariate(x)) {
result <- lapply(find_terms(x), function(i) {
find_transformation(i[["response"]])
})
unlist(result)
} else {
rv <- find_terms(x)[["response"]]
find_transformation(rv)
}
}


Expand Down

0 comments on commit de9c471

Please sign in to comment.