Skip to content

Footnotes not printing marker when row_group.as_column is set to TRUE #1001

@shannonhaughton

Description

@shannonhaughton

Description

I am trying to add a footnote to my table groupings using cell_row_groups. However when I have the tab_options(row_group.as_column = TRUE), the footnote appears but the marker does not.

Reproducible example

pizzaplace %>%
  dplyr::filter(name %in% c("soppressata", "peppr_salami")) %>%
  dplyr::group_by(name, size) %>%
  dplyr::summarize(`Pizzas Sold` = dplyr::n(), .groups = "drop") %>%
  gt(rowname_col = "size", groupname_col = "name") %>%
  summary_rows(
    groups = TRUE,
    columns = `Pizzas Sold`,
    fns = list(TOTAL = "sum"),
    formatter = fmt_number,
    decimals = 0,
    use_seps = TRUE
  ) %>%
  tab_options(row_group.as_column = TRUE) %>%
  tab_footnote(
    footnote = "The Pepper-Salami.",
    cells_row_groups(groups = "peppr_salami")
  )

Expected result

The marker on "peppr_salami" is missing.

Example without column option :
image

Example with column option:
image

Session info

R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    
system code page: 65001

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] tfrmt_0.0.0.9000 gt_0.6.0         forcats_0.5.1    stringr_1.4.0    dplyr_1.0.9      purrr_0.3.4      readr_2.1.2      tidyr_1.2.0      tibble_3.1.7     ggplot2_3.3.6   
[11] tidyverse_1.3.1  testthat_3.1.4  

loaded via a namespace (and not attached):
 [1] lubridate_1.8.0   prettyunits_1.1.1 ps_1.7.1          assertthat_0.2.1  rprojroot_2.0.3   digest_0.6.29     utf8_1.2.2        cellranger_1.1.0  R6_2.5.1         
[10] backports_1.4.1   reprex_2.0.1      httr_1.4.3        pillar_1.7.0      rlang_1.0.2       readxl_1.4.0      rstudioapi_0.13   callr_3.7.0       checkmate_2.1.0  
[19] desc_1.4.1        devtools_2.4.3    munsell_0.5.0     broom_1.0.0       compiler_4.1.1    modelr_0.1.8      pkgconfig_2.0.3   pkgbuild_1.3.1    htmltools_0.5.2  
[28] tidyselect_1.1.2  fansi_1.0.3       crayon_1.5.1      tzdb_0.3.0        dbplyr_2.2.1      withr_2.5.0       commonmark_1.8.0  brio_1.1.3        grid_4.1.1       
[37] jsonlite_1.8.0    gtable_0.3.0      lifecycle_1.0.1   DBI_1.1.3         magrittr_2.0.3    scales_1.2.0      cli_3.3.0         stringi_1.7.6     cachem_1.0.6     
[46] farver_2.1.0      fs_1.5.2          remotes_2.4.2     xml2_1.3.3        ellipsis_0.3.2    generics_0.1.2    vctrs_0.4.1       tools_4.1.1       glue_1.6.2       
[55] hms_1.1.1         processx_3.6.1    pkgload_1.2.4     fastmap_1.1.0     colorspace_2.0-3  sessioninfo_1.2.2 rvest_1.0.2       memoise_2.0.1     haven_2.5.0      
[64] sass_0.4.1        usethis_2.1.6   

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions