Skip to content

Commit

Permalink
docs!: switch to import from importFrom #102
Browse files Browse the repository at this point in the history
style: linespacing / and indentation #97
  • Loading branch information
egouldo committed Aug 26, 2024
1 parent bd04529 commit 29cfbdf
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions R/pred_to_Z.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,24 @@
#' The function computes the Z-score and VZ-score for each out-of-sample prediction estimate and its corresponding standard error using [Z_VZ_preds()].
#' @export
#' @import dplyr
#' @import purrr
#' @import cli
#' @import rlang
#' @importFrom purrr pluck map
#' @importFrom cli cli_warn
#' @importFrom rlang is_na
#' @importFrom tidyr any_of unnest
#' @importFrom glue glue
#' @seealso Equivalent to[log_transform_yi()] in terms of workflow data hierarchy.
pred_to_Z <- function(back_transformed_data,
params) {

if (any(rlang::is_na(params),
rlang::is_na(back_transformed_data))) {
cli::cli_warn("Argument {.arg params} or {.arg back_transformed_data} is {.val {NA}}. Returning {.val {NA}} for standardized predictions.")
if (any(
rlang::is_na(params),
rlang::is_na(back_transformed_data)
)) {
cli::cli_warn(
glue::glue("Argument {.arg params} or {.arg back_transformed_data} ",
"is {.val {NA}}. Returning {.val {NA}}",
"for standardized predictions.")
)
return(NA)
}

Expand Down

0 comments on commit 29cfbdf

Please sign in to comment.