Gt: Styling spanner labels can be easier if spanners have id values

Created on 1 Apr 2020  路  4Comments  路  Source: rstudio/gt

Hello, thank you very much for this package. I'm a fan of another one of your packages (pointblank) but I'm also using gt a lot these days. I have a feature request concerning spanners. Once they are made, they can be hard to style because cells_column_spanners doesn't use ids like cells_column_labels. Instead it uses labels, which can be unwieldy.

Could you make it possible to set a spanner id along with the spanner label in tab_spanner? Then, we won't have this problem anymore (as long as the labels are made to be unique).

Thanks!

[3] Advanced [3] High 鈾笌 Critical 鈽癸笌 Bug

Most helpful comment

You are doing nothing wrong! This is gt's (my) fault because there is no easy key or id for column spanners that would make later access easy or even possible. What needs to be done (by me) is to allow the creation of a key along with the styled label. In that way, tab_style() would require the key and not the styled label.

I believe that this is a critical requirement so this will be worked on quite soon.

All 4 comments

Sure, this sounds like something that should absolutely be done. Thanks for the detailed request, it's a good one!

Came here to file the same issue.
I tried using footnote on spanner, but spanner cannot be referenced if they are written in markdown.

@rich-iannone @jenniferp96 Am I doing something wrong? or should I file a separate issue (if it is a bug)?

You are doing nothing wrong! This is gt's (my) fault because there is no easy key or id for column spanners that would make later access easy or even possible. What needs to be done (by me) is to allow the creation of a key along with the styled label. In that way, tab_style() would require the key and not the styled label.

I believe that this is a critical requirement so this will be worked on quite soon.

Thanks for your assurance and for this awesome package. _Your commitment to this project is highlighting from your reply._ 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

r2evans picture r2evans  路  5Comments

vikram-rawat picture vikram-rawat  路  3Comments

rich-iannone picture rich-iannone  路  6Comments

mine-cetinkaya-rundel picture mine-cetinkaya-rundel  路  4Comments

Torvaney picture Torvaney  路  3Comments