From fa9bbb0cbd114ef8dcf0a266cf99038b3e0b1359 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 5 Jan 2025 13:20:32 +0100 Subject: [PATCH] lintr --- R/standardize.models.R | 4 ++-- R/unstandardize.R | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/standardize.models.R b/R/standardize.models.R index e6d1e8ca2..392e54af4 100644 --- a/R/standardize.models.R +++ b/R/standardize.models.R @@ -401,7 +401,7 @@ standardize.mediate <- function(x, } - text <- utils::capture.output({ + junk <- utils::capture.output({ model_std <- stats::update(x, model.y = y_std, model.m = m_std, # control.value = control.value, treat.value = treat.value @@ -472,7 +472,7 @@ standardize.biglm <- standardize.wbm # check if model has a response variable that should not be standardized. info$is_linear && - !info$family == "inverse.gaussian" && + info$family != "inverse.gaussian" && !info$is_survival && !info$is_censored diff --git a/R/unstandardize.R b/R/unstandardize.R index d601f0520..22a49fad3 100644 --- a/R/unstandardize.R +++ b/R/unstandardize.R @@ -72,10 +72,10 @@ unstandardize.data.frame <- function(x, dots <- match.call(expand.dots = FALSE)[["..."]] - if (!is.null(dots$grp_attr_dw)) { - grp_attr_dw <- eval(dots$grp_attr_dw, envir = parent.frame(1L)) - } else { + if (is.null(dots$grp_attr_dw)) { grp_attr_dw <- NULL + } else { + grp_attr_dw <- eval(dots$grp_attr_dw, envir = parent.frame(1L)) } if (!is.null(grp_attr_dw)) {