Removed unused variable

This commit is contained in:
Louis 2025-10-13 10:29:22 +02:00
parent 47fe4de889
commit ad91ae0ef1

View file

@ -9,11 +9,9 @@ ellipse_table <- function(df, nr = 5, nc = 5, format = "latex") {
if (format == "latex") { if (format == "latex") {
h_ellipsis <- "$\\dots$" # horizontal (for columns) h_ellipsis <- "$\\dots$" # horizontal (for columns)
v_ellipsis <- "$\\vdots$" # vertical (for rows) v_ellipsis <- "$\\vdots$" # vertical (for rows)
both_ellipsis <- "$\\ddots$" # for center cell (optional)
} else { } else {
h_ellipsis <- "..." h_ellipsis <- "..."
v_ellipsis <- "..." v_ellipsis <- "..."
both_ellipsis <- "..."
} }
# Select top/bottom rows # Select top/bottom rows
@ -55,12 +53,6 @@ ellipse_table <- function(df, nr = 5, nc = 5, format = "latex") {
names(sub_df)[ceiling(nc / 2) + 1] <- h_ellipsis names(sub_df)[ceiling(nc / 2) + 1] <- h_ellipsis
} }
# # Optionally replace center cell with diagonal dots (nice touch in latex)
# if (format == "latex" && nrows > nr && ncols > nc) {
# mid_r <- ceiling(nrow(sub_df) / 2)
# mid_c <- ceiling(ncol(sub_df) / 2)
# sub_df[mid_r, mid_c] <- both_ellipsis
# }
# Print with kable # Print with kable
return(sub_df) return(sub_df)
} }