diff --git a/R/utils.R b/R/utils.R index 4e64489f..b5a2e247 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,5 +1,5 @@ #' @keywords internal -".someattributes<-" <- function(x, value) { +`.someattributes<-` <- function(x, value) { for (a in names(value)) { attr(x, a) <- value[[a]] } diff --git a/R/utils_ci.R b/R/utils_ci.R index 9f36db72..5cfe2f7d 100644 --- a/R/utils_ci.R +++ b/R/utils_ci.R @@ -15,8 +15,8 @@ ncp <- suppressWarnings(stats::optim( par = 1.1 * rep(lambda, 2), fn = function(x) { - q <- stats::qf(p = probs, df, df_error, ncp = x) - sum(abs(q - f)) + quan <- stats::qf(p = probs, df, df_error, ncp = x) + sum(abs(quan - f)) }, control = list(abstol = 1e-09) )) @@ -45,8 +45,8 @@ ncp <- suppressWarnings(stats::optim( par = 1.1 * rep(t, 2), fn = function(x) { - q <- stats::qt(p = probs, df = df_error, ncp = x) - sum(abs(q - t)) + quan <- stats::qt(p = probs, df = df_error, ncp = x) + sum(abs(quan - t)) }, control = list(abstol = 1e-09) )) @@ -68,8 +68,8 @@ ncp <- suppressWarnings(stats::optim( par = 1.1 * rep(chisq, 2), fn = function(x) { - q <- stats::qchisq(p = probs, df, ncp = x) - sum(abs(q - chisq)) + quan <- stats::qchisq(p = probs, df, ncp = x) + sum(abs(quan - chisq)) }, control = list(abstol = 1e-09) )) @@ -100,7 +100,7 @@ ci > 1) { insight::format_error("ci must be a single numeric value between (0, 1)") } - return(TRUE) + TRUE } #' @keywords internal diff --git a/R/utils_interpret.R b/R/utils_interpret.R index 4633b85b..1cb25131 100644 --- a/R/utils_interpret.R +++ b/R/utils_interpret.R @@ -15,5 +15,5 @@ ) } - return(choices[[rule]]) + choices[[rule]] } diff --git a/R/utils_validate_input_data.R b/R/utils_validate_input_data.R index 089d702a..43f37c7b 100644 --- a/R/utils_validate_input_data.R +++ b/R/utils_validate_input_data.R @@ -254,8 +254,7 @@ wide = TRUE, allow_ordered = FALSE, verbose = TRUE, ...) { if (inherits(x, "formula")) { - if (length(x) != 3L || - x[[3L]][[1L]] != as.name("|")) { + if (length(x) != 3L || x[[3L]][[1L]] != as.name("|")) { insight::format_error("Formula must have the 'x ~ groups | blocks'.") } @@ -323,7 +322,7 @@ verbose = TRUE, ...) { if (inherits(x, "formula")) { if (length(x) != 3L || length(x[[3]]) != 1L) { - insight::format_error("Formula must have the form of 'DV1 + ... + DVk ~ group', with exactly one term on the RHS.") + insight::format_error("Formula must have the form of 'DV1 + ... + DVk ~ group', with exactly one term on the RHS.") # nolint } data <- .resolve_formula(stats::reformulate(as.character(x)[3:2]), data, ...)