You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search for duplicates among the existing issues (both open and closed).
Proposal
I'd like to be able to tag my table with my social media usernames when I do things like #TidyTuesday, or other community participation activities. We are able to do that with figures, and I'm hoping that this functionality can be brought to gt. I will show you what I mean with this MWE:
# Begin setup code
library(tidyverse)
library(gt)
library(sysfonts)
library(ggtext)
library(showtext)
# This is where I have my fontawesome fonts saved
font_add("fa6-brands",
"/usr/share/fonts/fontawesome-free-6.6.0-desktop/otfs/Font Awesome 6 Brands-Regular-400.otf")
gh <- str_glue("<span style='font-family: \"fa6-brands\"'></span>")
li <- str_glue("<span style='font-family:\"fa6-brands\"'></span>")
caption_text <- str_glue("{gh} github_user {li} linkedin_user")
showtext_auto(enable = TRUE)
I can make the table in the documentation, adding in a caption:
# Create a display table showing ten of
# the largest islands in the world
gt_tbl <- gt(islands_tbl)
gt_tbl |>
tab_header(
title = "Large Landmasses of the World",
subtitle = "The top ten largest are presented"
) |>
tab_caption("My caption text")
But I can't use the same caption object from my plot
gt_tbl |>
tab_header(
title = "Large Landmasses of the World",
subtitle = "The top ten largest are presented"
) |>
tab_caption(md(caption_text))
The text was updated successfully, but these errors were encountered:
Prework
Proposal
I'd like to be able to tag my table with my social media usernames when I do things like #TidyTuesday, or other community participation activities. We are able to do that with figures, and I'm hoping that this functionality can be brought to
gt
. I will show you what I mean with this MWE:I'll use the
islands
data in thegt
package:And now I will make the world's dumbest plot:
I can make the table in the documentation, adding in a caption:
But I can't use the same caption object from my plot
The text was updated successfully, but these errors were encountered: