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
Footnotes without a designated location are applied via gt::tab_source_note, which does not allow for generic footnotes to appear prior to footnotes with defined locations.
Whereas if I were to apply the footnotes to the gt object manually as desired, I can get the desired output:
tfrmt::print_mock_gt(tfrmt) |>
gt::tab_footnote("BMI: Body Mass Index") |>
gt::tab_footnote(
"Placebo drug + standard of care",
locations = gt::cells_column_labels(
columns = all_of(
as.character("column2")
)
)
) |>
gt::tab_source_note("Source Note")
I think a simple fix would be to add a new argument to footnote_structure, source, which is TRUE for source notes and FALSE otherwise.
When source == TRUE and there's no location, then call gt::tab_footnote. Otherwise, use gt::tab_source_note as is.
The text was updated successfully, but these errors were encountered:
Footnotes without a designated location are applied via
gt::tab_source_note
, which does not allow for generic footnotes to appear prior to footnotes with defined locations.For example,
This occurs because footnote structures without defined locations are automatically applied as source notes
tfrmt/R/apply_footnote_plan.R
Lines 45 to 47 in fe6960b
Whereas if I were to apply the footnotes to the gt object manually as desired, I can get the desired output:
I think a simple fix would be to add a new argument to
footnote_structure
,source
, which isTRUE
for source notes andFALSE
otherwise.When
source == TRUE
and there's no location, then callgt::tab_footnote
. Otherwise, usegt::tab_source_note
as is.The text was updated successfully, but these errors were encountered: