|
8 | 8 | #' of `lm` (and also see the notes at |
9 | 9 | #' https://developer.r-project.org/model-fitting-functions.html). |
10 | 10 | #' |
11 | | -#' `convert_form_to_xy_fit()` and `convert_xy_to_form_fit()` are for when the |
| 11 | +#' `.convert_form_to_xy_fit()` and `.convert_xy_to_form_fit()` are for when the |
12 | 12 | #' data are created for modeling. |
13 | | -#' `convert_form_to_xy_fit()` saves both the data objects as well as the objects |
| 13 | +#' `.convert_form_to_xy_fit()` saves both the data objects as well as the objects |
14 | 14 | #' needed when new data are predicted (e.g. `terms`, etc.). |
15 | 15 | #' |
16 | | -#' `convert_form_to_xy_new()` and `convert_xy_to_form_new()` are used when new |
| 16 | +#' `.convert_form_to_xy_new()` and `.convert_xy_to_form_new()` are used when new |
17 | 17 | #' samples are being predicted and only require the predictors to be available. |
18 | 18 | #' |
19 | 19 | #' @param data A data frame containing all relevant variables (e.g. outcome(s), |
|
35 | 35 | #' |
36 | 36 | #' @importFrom stats .checkMFClasses .getXlevels delete.response |
37 | 37 | #' @importFrom stats model.offset model.weights na.omit na.pass |
38 | | -convert_form_to_xy_fit <- function(formula, |
| 38 | +.convert_form_to_xy_fit <- function(formula, |
39 | 39 | data, |
40 | 40 | ..., |
41 | 41 | na.action = na.omit, |
@@ -161,7 +161,7 @@ convert_form_to_xy_fit <- function(formula, |
161 | 161 | #' @rdname convert_helpers |
162 | 162 | #' @keywords internal |
163 | 163 | #' @export |
164 | | -convert_form_to_xy_new <- function(object, |
| 164 | +.convert_form_to_xy_new <- function(object, |
165 | 165 | new_data, |
166 | 166 | na.action = na.pass, |
167 | 167 | composition = "data.frame") { |
@@ -237,14 +237,14 @@ convert_form_to_xy_new <- function(object, |
237 | 237 | #' @param weights A numeric vector containing the weights. |
238 | 238 | #' @param y_name A string specifying the name of the outcome. |
239 | 239 | #' @inheritParams fit.model_spec |
240 | | -#' @inheritParams convert_form_to_xy_fit |
| 240 | +#' @inheritParams .convert_form_to_xy_fit |
241 | 241 | #' |
242 | 242 | #' @rdname convert_helpers |
243 | 243 | #' @keywords internal |
244 | 244 | #' @export |
245 | 245 | #' |
246 | 246 | #' @importFrom dplyr bind_cols |
247 | | -convert_xy_to_form_fit <- function(x, |
| 247 | +.convert_xy_to_form_fit <- function(x, |
248 | 248 | y, |
249 | 249 | weights = NULL, |
250 | 250 | y_name = "..y", |
@@ -297,7 +297,7 @@ convert_xy_to_form_fit <- function(x, |
297 | 297 | #' @rdname convert_helpers |
298 | 298 | #' @keywords internal |
299 | 299 | #' @export |
300 | | -convert_xy_to_form_new <- function(object, new_data) { |
| 300 | +.convert_xy_to_form_new <- function(object, new_data) { |
301 | 301 | new_data <- new_data[, object$x_var, drop = FALSE] |
302 | 302 | if (!is.data.frame(new_data)) |
303 | 303 | new_data <- as.data.frame(new_data) |
|
0 commit comments