I have a table created in quarto pdf document using gt.
The pdf document that appears is not great because the table is too long, and it goes beyond the margins. Is there any way to change the table in a landscape position to avoid this problem?
I have tried following example,
library(gt)
iris_gt <- iris %>%
gt(
groupname_col = "Species") %>%
cols_align(align = "center") %>%
tab_spanner(
label = "Sepal",
columns = c(1:2)) %>%
tab_spanner(
label = "Petal",
columns = c(3:4)) %>%
cols_label(
Sepal.Length = "Length",
Sepal.Width = "Width",
Petal.Length = "Length",
Petal.Width = "Width"
)
iris_gt %>%
gt::tab_options(
page.orientation = "landscape"
)