|
32 | 32 | #' @inheritParams fit.cluster_spec |
33 | 33 | #' @rdname convert_helpers |
34 | 34 | #' @keywords internal |
35 | | -.convert_form_to_x_fit <- function(formula, |
36 | | - data, |
37 | | - ..., |
38 | | - na.action = na.omit, |
39 | | - indicators = "traditional", |
40 | | - composition = "data.frame", |
41 | | - remove_intercept = TRUE) { |
| 35 | +.convert_form_to_x_fit <- function( |
| 36 | + formula, |
| 37 | + data, |
| 38 | + ..., |
| 39 | + na.action = na.omit, |
| 40 | + indicators = "traditional", |
| 41 | + composition = "data.frame", |
| 42 | + remove_intercept = TRUE |
| 43 | +) { |
42 | 44 | if (!(composition %in% c("data.frame", "matrix"))) { |
43 | 45 | rlang::abort("`composition` should be either 'data.frame' or 'matrix'.") |
44 | 46 | } |
@@ -155,9 +157,7 @@ local_one_hot_contrasts <- function(frame = rlang::caller_env()) { |
155 | 157 | #' @inheritParams .convert_form_to_x_fit |
156 | 158 | #' @rdname convert_helpers |
157 | 159 | #' @keywords internal |
158 | | -.convert_x_to_form_fit <- function(x, |
159 | | - weights = NULL, |
160 | | - remove_intercept = TRUE) { |
| 160 | +.convert_x_to_form_fit <- function(x, weights = NULL, remove_intercept = TRUE) { |
161 | 161 | if (is.vector(x)) { |
162 | 162 | rlang::abort("`x` cannot be a vector.") |
163 | 163 | } |
@@ -212,10 +212,12 @@ make_formula <- function(x, short = TRUE) { |
212 | 212 | #' @inheritParams predict.cluster_fit |
213 | 213 | #' @rdname convert_helpers |
214 | 214 | #' @keywords internal |
215 | | -.convert_form_to_x_new <- function(object, |
216 | | - new_data, |
217 | | - na.action = stats::na.pass, |
218 | | - composition = "data.frame") { |
| 215 | +.convert_form_to_x_new <- function( |
| 216 | + object, |
| 217 | + new_data, |
| 218 | + na.action = stats::na.pass, |
| 219 | + composition = "data.frame" |
| 220 | +) { |
219 | 221 | if (!(composition %in% c("data.frame", "matrix"))) { |
220 | 222 | rlang::abort("`composition` should be either 'data.frame' or 'matrix'.") |
221 | 223 | } |
|
0 commit comments