+
+
+
+
+
+
+
+
+Large gt Table Split into Pages
+Load necessary packages
+library(dplyr) library(gt)
+Create a large data frame
+df <- data.frame( Group = rep(c(“A”, “B”, “C”), each = 10), Item = rep(paste(“Item”, 1:10), times = 3), Value = sample(1:100, 30, replace = TRUE) )
+Split the data frame into two parts
+df_part1 <- df[1:15, ] df_part2 <- df[16:30, ]
+Create the first table
+table_part1 <- df_part1 %>% gt() %>% tab_header( title = “Page 1” )
+Create the second table
+table_part2 <- df_part2 %>% gt() %>% tab_header( title = “Page 2” )
+Render the tables sequentially
+table_part1 table_part2
+ + +