Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Nov 22, 2024
1 parent bf4a078 commit b5341f2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
39 changes: 28 additions & 11 deletions R/tbl-format-setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,15 @@
#' @export
#' @examplesIf rlang::is_installed("palmerpenguins")
#' tbl_format_setup(palmerpenguins::penguins)
tbl_format_setup <- function(x, width = NULL, ...,
n = NULL, max_extra_cols = NULL,
max_footer_lines = NULL,
focus = NULL) {
tbl_format_setup <- function(
x,
width = NULL,
...,
n = NULL,
max_extra_cols = NULL,
max_footer_lines = NULL,
focus = NULL
) {
"!!!!DEBUG tbl_format_setup()"

width <- get_width_print(width)
Expand All @@ -79,8 +84,12 @@ tbl_format_setup <- function(x, width = NULL, ...,
# Calls UseMethod("tbl_format_setup"),
# allows using default values in S3 dispatch
out <- tbl_format_setup_dispatch(
x, width, ...,
n = n, max_extra_cols = max_extra_cols, max_footer_lines = max_footer_lines,
x,
width,
...,
n = n,
max_extra_cols = max_extra_cols,
max_footer_lines = max_footer_lines,
focus = focus
)
return(out)
Expand Down Expand Up @@ -203,11 +212,19 @@ tbl_format_setup.tbl <- function(x, width, ...,
#' in the body.
#'
#' @keywords internal
new_tbl_format_setup <- function(x, df, width, tbl_sum, body,
rows_missing, rows_total,
extra_cols, extra_cols_total,
max_footer_lines,
abbrev_cols) {
new_tbl_format_setup <- function(
x,
df,
width,
tbl_sum,
body,
rows_missing,
rows_total,
extra_cols,
extra_cols_total,
max_footer_lines,
abbrev_cols
) {
trunc_info <- list(
x = x,
df = df,
Expand Down
12 changes: 9 additions & 3 deletions R/tbl-format.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ format.tbl <- function(x, width = NULL, ...,
)
}

format_tbl <- function(x, width = NULL, ...,
n_extra = NULL,
n = NULL, max_extra_cols = NULL, max_footer_lines = NULL) {
format_tbl <- function(
x,
width = NULL,
...,
n_extra = NULL,
n = NULL,
max_extra_cols = NULL,
max_footer_lines = NULL
) {
check_dots_empty(action = signal)

if (!is.null(n_extra)) {
Expand Down

0 comments on commit b5341f2

Please sign in to comment.