Created
January 15, 2024 20:57
-
-
Save maxdrohde/4e5b988a2200cb51911be71e26927393 to your computer and use it in GitHub Desktop.
display.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Display data frame as a nicely formatted and interactive GT table | |
display <- function(df){ | |
df |> | |
gt::gt() |> | |
gt::opt_interactive(use_search = TRUE, | |
use_compact_mode = TRUE, | |
use_text_wrapping = TRUE) |> | |
gt::opt_stylize(style = 2) |> | |
gt::cols_width(everything() ~ px(250)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment