Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Nov 22, 2024
1 parent 2944322 commit 968ba68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions R/find_transformation.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ find_transformation.default <- function(x, include_all = FALSE, ...) {

# sanity check for multivariate models
if (is_multivariate(x)) {
result <- lapply(find_terms(x), function(i) {
result <- lapply(find_terms(x, verbose = FALSE), function(i) {
find_transformation(i[["response"]])
})
unlist(result)
} else if (include_all) {
lapply(find_terms(x), function(i) {
lapply(find_terms(x, verbose = FALSE), function(i) {
stats::setNames(
unlist(lapply(i, find_transformation), use.names = FALSE),
clean_names(i)
)
})
} else {
# "raw" response
rv <- find_terms(x)[["response"]]
rv <- find_terms(x, verbose = FALSE)[["response"]]
# for divisions, like x/3, `find_response()` returns a character vector
# of length 2, one with the nominator and the denominator. In this case,
# check against original response
Expand Down
3 changes: 0 additions & 3 deletions R/null_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
#'
#' @export
null_model <- function(model, verbose = TRUE, ...) {
# check if model formula is ok
formula_ok(model)

model_formula <- find_formula(model, verbose = verbose)
offset_term <- tryCatch(
{
Expand Down

0 comments on commit 968ba68

Please sign in to comment.