## Format the table
tbl <- data.frame(
x = c(1, 123, 123456678, 1235678887644),
y = c("abc", "this is a long string", "another long string", "yet another long string"),
z = c(TRUE, FALSE, TRUE, FALSE),
d = runif(4) * 100000
)
formatted_tbl <- format_tbl(tbl, max_tbl_width = 50, max_row = 3)
cat(formatted_tbl, sep = "\n")
Run the code above in your browser using DataLab