2222# ' }
2323# ' @export
2424cal_estimate_beta <- function (
25- .data ,
26- truth = NULL ,
27- shape_params = 2 ,
28- location_params = 1 ,
29- estimate = dplyr :: starts_with(" .pred_" ),
30- parameters = NULL ,
31- ...
25+ .data ,
26+ truth = NULL ,
27+ shape_params = 2 ,
28+ location_params = 1 ,
29+ estimate = dplyr :: starts_with(" .pred_" ),
30+ parameters = NULL ,
31+ ...
3232) {
3333 UseMethod(" cal_estimate_beta" )
3434}
3535
3636# ' @export
3737# ' @rdname cal_estimate_beta
3838cal_estimate_beta.data.frame <- function (
39- .data ,
40- truth = NULL ,
41- shape_params = 2 ,
42- location_params = 1 ,
43- estimate = dplyr :: starts_with(" .pred_" ),
44- parameters = NULL ,
45- ... ,
46- .by = NULL
39+ .data ,
40+ truth = NULL ,
41+ shape_params = 2 ,
42+ location_params = 1 ,
43+ estimate = dplyr :: starts_with(" .pred_" ),
44+ parameters = NULL ,
45+ ... ,
46+ .by = NULL
4747) {
4848 stop_null_parameters(parameters )
4949
@@ -70,13 +70,13 @@ cal_estimate_beta.data.frame <- function(
7070# ' @export
7171# ' @rdname cal_estimate_beta
7272cal_estimate_beta.tune_results <- function (
73- .data ,
74- truth = NULL ,
75- shape_params = 2 ,
76- location_params = 1 ,
77- estimate = dplyr :: starts_with(" .pred_" ),
78- parameters = NULL ,
79- ...
73+ .data ,
74+ truth = NULL ,
75+ shape_params = 2 ,
76+ location_params = 1 ,
77+ estimate = dplyr :: starts_with(" .pred_" ),
78+ parameters = NULL ,
79+ ...
8080) {
8181 info <- get_tune_data(.data , parameters )
8282
@@ -96,13 +96,13 @@ cal_estimate_beta.tune_results <- function(
9696# ' @export
9797# ' @rdname cal_estimate_beta
9898cal_estimate_beta.grouped_df <- function (
99- .data ,
100- truth = NULL ,
101- shape_params = 2 ,
102- location_params = 1 ,
103- estimate = NULL ,
104- parameters = NULL ,
105- ...
99+ .data ,
100+ truth = NULL ,
101+ shape_params = 2 ,
102+ location_params = 1 ,
103+ estimate = NULL ,
104+ parameters = NULL ,
105+ ...
106106) {
107107 abort_if_grouped_df()
108108}
@@ -137,12 +137,12 @@ beta_fit_over_groups <- function(info, shape_params, location_params, ...) {
137137
138138
139139fit_all_beta_models <- function (
140- .data ,
141- truth = NULL ,
142- shape = 2 ,
143- location = 1 ,
144- estimate = NULL ,
145- ...
140+ .data ,
141+ truth = NULL ,
142+ shape = 2 ,
143+ location = 1 ,
144+ estimate = NULL ,
145+ ...
146146) {
147147 lvls <- levels(.data [[truth ]])
148148 num_lvls <- length(lvls )
@@ -176,12 +176,12 @@ fit_all_beta_models <- function(
176176
177177
178178fit_beta_model <- function (
179- .data ,
180- truth = NULL ,
181- shape = 2 ,
182- location = 1 ,
183- estimate = NULL ,
184- ...
179+ .data ,
180+ truth = NULL ,
181+ shape = 2 ,
182+ location = 1 ,
183+ estimate = NULL ,
184+ ...
185185) {
186186 outcome_data <- .data [[truth ]]
187187 lvls <- levels(outcome_data )
@@ -255,6 +255,8 @@ check_cal_groups <- function(group, .data, call = rlang::env_parent()) {
255255
256256# ' @export
257257print.betacal <- function (x , ... ) {
258- cli :: cli_inform(" Beta calibration ({x$parameters}) using {x$model$df.null} samples" )
258+ cli :: cli_inform(
259+ " Beta calibration ({x$parameters}) using {x$model$df.null} samples"
260+ )
259261 invisible (x )
260262}
0 commit comments