gt/gtExtras: cols_label with_tooltip from a dataframe/list #1474
Unanswered
vikasrawal
asked this question in
Q&A
Replies: 1 comment
-
This is a good idea. In the mean time, you can use plain old html to do it! If you use the abbr html tag https://html.com/tags/abbr/#:~:text=The%20element%20is%20used,technologies%20do%20use%20this%20information. and wrap it in the special mtcars |>
gt::gt() |>
cols_label(
vs = html(
"<abbr title = 'Tooltip'> vs</abbr>"
)
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to pick up labels and tooltips for column names from a data.frame (which has three columns: colnames, collabels and coltooltips).
In other words, in the following,
cols_label(
var1=with_tooltip(label="Label 1",tooltip="Tooltip 2"),
var2=with_tooltip(label="Label 2",tooltip="Tooltip 2"))
I want to pick up variables, labels and tooltips from a data frame. I can write a function that can create these strings but how do I use them as arguments for cols_label.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions