|
4 | 4 | #' |
5 | 5 | #' @param frosting a `frosting` postprocessor. The layer will be added to the |
6 | 6 | #' sequence of operations for this frosting. |
| 7 | +#' @param lambdas Internal. A data frame of lambda values to be used for |
| 8 | +#' inverting the transformation. |
7 | 9 | #' @param ... One or more selector functions to scale variables |
8 | 10 | #' for this step. See [recipes::selections()] for more details. |
9 | | -#' @param df a data frame that contains the population data to be used for |
10 | | -#' inverting the existing scaling. |
11 | 11 | #' @param by A (possibly named) character vector of variables to join by. |
12 | 12 | #' @param id a random id string |
13 | 13 | #' |
@@ -56,7 +56,7 @@ layer_epi_YeoJohnson <- function(frosting, ..., lambdas = NULL, by = NULL, id = |
56 | 56 | } |
57 | 57 |
|
58 | 58 | layer_epi_YeoJohnson_new <- function(lambdas, by, terms, id) { |
59 | | - epipredict:::layer("epi_YeoJohnson", lambdas = lambdas, by = by, terms = terms, id = id) |
| 59 | + layer("epi_YeoJohnson", lambdas = lambdas, by = by, terms = terms, id = id) |
60 | 60 | } |
61 | 61 |
|
62 | 62 | #' @export |
@@ -94,7 +94,7 @@ slather.layer_epi_YeoJohnson <- function(object, components, workflow, new_data, |
94 | 94 | # Establish the join columns. |
95 | 95 | object$by <- object$by %||% |
96 | 96 | intersect( |
97 | | - epipredict:::epi_keys_only(components$predictions), |
| 97 | + epi_keys_only(components$predictions), |
98 | 98 | colnames(select(lambdas, -starts_with(".lambda_"))) |
99 | 99 | ) |
100 | 100 | joinby <- list(x = names(object$by) %||% object$by, y = object$by) |
@@ -180,7 +180,7 @@ slather.layer_epi_YeoJohnson <- function(object, components, workflow, new_data, |
180 | 180 | #' @export |
181 | 181 | print.layer_epi_YeoJohnson <- function(x, width = max(20, options()$width - 30), ...) { |
182 | 182 | title <- "Yeo-Johnson transformation (see `lambdas` object for values) on " |
183 | | - epipredict:::print_layer(x$terms, title = title, width = width) |
| 183 | + print_layer(x$terms, title = title, width = width) |
184 | 184 | } |
185 | 185 |
|
186 | 186 | # Inverse Yeo-Johnson transformation |
|
0 commit comments