Thanks to ChatGPT 5 Pro. It took a long time to answer, but he answered correctly. I'm happy with the table. The best package I have tried so far for cross-tabulation. I think I'll be using the expss package for all my tables.
expss Authors need to prepare better support documentation. It's quite complicated and hard to find anything.
I am giving the solution for those who have the same problem.
library(expss) # load package
expss_output_viewer() # to view in the Viewer
mtcars %>%
tab_cols(list("Miles/(US) gallon")) %>% # column names
tab_cells(set_var_lab(mpg, "")) %>% # <-- Changed
tab_rows(cyl) %>%
tab_subtotal_rows("Total" = lo %thru% hi,
position = "bottom") %>% # <-- changed
tab_stat_fun("n" = w_n,
"Mean" = w_mean,
"Std. Err." = w_se,
"Min" = w_min,
"Max" = w_max,
unsafe = FALSE,
method = list) %>%
tab_pivot()