Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: changed the style of the table header in the RTF output #33

Merged
merged 1 commit into from
May 14, 2024

Conversation

kpagacz
Copy link
Collaborator

@kpagacz kpagacz commented May 7, 2024

  • in outputs where there are more than one table per file, the title of the tables other than the first one have their style changed
  • this hopefully avoids an issue where the downstream tools used by users bookmark the titles of the tables other than the first one

* in outputs where there are more than one table per file, the title
  of the tables other than the first one have their style changed
* this hopefully avoids an issue where the downstream tools used by users
  bookmark the titles of the tables other than the first one
@kpagacz kpagacz requested a review from shengwei66 May 7, 2024 14:23
@kpagacz
Copy link
Collaborator Author

kpagacz commented May 14, 2024

The way the RTF files look in word should stay the same. Here's some code to generate the multiple tables:

devtools::load_all(".")

tbl <- data.frame(
  label = "Subjects with ≥ 1 concomitant medication",
  col1 = "1 (100.0%)",
  col2 = "1 (100.0%)",
  col3 = "2 (100.0%)",
  col4 = "1 (100.0%)",
  col5 = "3 (100.0%)",
  row_type = "VALUE"
)

tbl2 <- data.frame(
  label = "Subjects with ≥ 1 concomitant medication",
  col1 = "1 (100.0%)",
  col2 = "1 (100.0%)",
  col3 = "2 (100.0%)",
  col4 = "1 (100.0%)",
  col5 = "3 (100.0%)",
  row_type = "VALUE"
)

gentlg(
  huxme = tbl,
  orientation = "landscape",
  file = "no-borders",
  title = "Summary of Concomitant Medications",
  colspan = list(
    c("", "Active Study Agent", "Active Study Agent", "Active Study Agent", "", ""),
    c("", "Treatment 1", "Treatment 1", "Treatment 2", "Combined", "Total")
  ),
  colheader = c(" Standardized medication name", "N=1", "N=1", "N=2", "N=1", "N=3"),
  wcol = .30
)

gentlg(
  huxme = list(tbl, tbl2),
  orientation = "landscape",
  file = "no-borders",
  title = "Summary of Concomitant Medications",
  colspan = list(
    c("", "Active Study Agent", "Active Study Agent", "Active Study Agent", "", ""),
    c("", "Treatment 1", "Treatment 1", "Treatment 2", "Combined", "Total")
  ),
  colheader = c(" Standardized medication name", "N=1", "N=1", "N=2", "N=1", "N=3"),
  wcol = .30
)

Copy link
Collaborator

@shengwei66 shengwei66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@kpagacz kpagacz merged commit 5246159 into main May 14, 2024
5 checks passed
@kpagacz kpagacz deleted the caption_style_for_the_first_table_only branch May 14, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants