Skip to content

Commit d209619

Browse files
committed
style: styler (GHA)
1 parent 97729a5 commit d209619

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

R/epi_df_forbidden_methods.R

+14-9
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
#' @export
1010
mean.epi_df <- function(x, ...) {
1111
cli_abort(c("`mean` can't be used on entire `epi_df`s",
12-
"x" = "{rlang::caller_arg(x)} was an `epi_df`",
13-
"i" = "If you encountered this while trying to take a rolling mean
12+
"x" = "{rlang::caller_arg(x)} was an `epi_df`",
13+
"i" = "If you encountered this while trying to take a rolling mean
1414
of a column using `epi_slide`, you probably forgot to
1515
specify the column name (e.g., ~ mean(.x$colname)). You may
16-
also prefer to use the specialized `epi_slide_mean` method."))
16+
also prefer to use the specialized `epi_slide_mean` method."
17+
))
1718
}
1819

1920
# Similarly, provide better error messages for some other potentially-common
@@ -22,17 +23,21 @@ mean.epi_df <- function(x, ...) {
2223
#' @export
2324
Summary.epi_df <- function(..., na.rm = FALSE) {
2425
generic <- .Generic # cli uses dot prefixes for special purpose, don't upset it
25-
maybe_opt_pointer <- switch(
26-
.Generic,
26+
maybe_opt_pointer <- switch(.Generic,
2727
sum = "You may also prefer the specialized epi_slide_sum method.",
28-
prod =, min =, max =, all =, any = "You may also prefer the specialized epi_slide_opt method.",
28+
prod = ,
29+
min = ,
30+
max = ,
31+
all = ,
32+
any = "You may also prefer the specialized epi_slide_opt method.",
2933
range = "",
3034
cli_abort("Unrecognized .Generic: {generic}")
3135
)
3236
cli_abort(c("`{generic}` can't be used on entire `epi_df`s",
33-
"x" = "{rlang::caller_arg(..1)} was an `epi_df`",
34-
"i" = "If you encountered this while trying to take a rolling {generic}
37+
"x" = "{rlang::caller_arg(..1)} was an `epi_df`",
38+
"i" = "If you encountered this while trying to take a rolling {generic}
3539
of a column using `epi_slide`, you probably forgot to
3640
specify the column name (e.g., ~ mean(.x$colname)).
37-
{maybe_opt_pointer}"))
41+
{maybe_opt_pointer}"
42+
))
3843
}

0 commit comments

Comments
 (0)