Skip to content

Closes #63 add onco table and plot examples#148

Open
jeffreyad wants to merge 22 commits intomainfrom
63-add-onco-table-and-plot-examples
Open

Closes #63 add onco table and plot examples#148
jeffreyad wants to merge 22 commits intomainfrom
63-add-onco-table-and-plot-examples

Conversation

@jeffreyad
Copy link
Collaborator

@jeffreyad jeffreyad commented Feb 19, 2026

Pull Request

DESCRIPTION GOES HERE

Before you submit your pull request, take a look at the following checklist. Many thanks for your contribution!

  • Title: Place Closes #<insert_issue_number> at the beginning of your PR title. Use the Edit button in the top-right if you need to update.
  • Linked Issue: Ensure the related issue is linked in the "Development Section" on the right-hand side.
  • First Contribution: If this is your first contribution, add yourself to the DESCRIPTION file.
  • Impact on Examples: If your updates impact any examples, review locally for warnings or errors in the impacted example pages.
  • Merge Conflicts: Developers should address any merge conflicts and merge upon successful review.
  • New Packages: If new packages were used, ensure they are included in the DESCRIPTION file's Imports section.
  • Updated Examples: If you added or updated an example, ensure it runs on the latest CRAN release versions of all packages used.
  • Testing Instructions: Provide instructions on how to test the code if necessary.

@jeffreyad jeffreyad linked an issue Feb 19, 2026 that may be closed by this pull request
Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

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

I'm not very savvy with oncology stuff - but looks really nice from a quick glance.

maybe some folks from admiral onco team would be able to help with review - @bundfussr @pharmaverse/admiralonco any interest?


This guide demonstrates how pharmaverse packages, along with tools from the
tidyverse, can be used to create standard oncology survival Tables, Listings,
and Graphs (TLGs) using the `{pharmaverseadam}` `ADTTE_ONCO` dataset as input.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if the adtte_onco dataset is well suited for creating summaries. It is based on adrs_onco, which is based on rs_onco_recist. rs_onco_recist contains only eight subjects. Unfortunately, we used the complete adsl dataset when creating adrs_onco and adtte_onco. Therefore almost all patients are censored at day one, which leads to strange and highly unlikely results:

  PARAMCD PARAM                         N N_events Pct_events Median_AVAL
  <chr>   <chr>                     <int>    <int>      <dbl>       <dbl>
1 OS      Overall Survival            254        3        1.2       140  
2 PFS     Progression Free Survival   254        6        2.4         1  
3 RSD     Duration of Response          4        1       25          32.5

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure we have any other options available? Maybe this could be explained with a short note in the article?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think for the short term we don't have other options (except maybe generating an ADTTE dataset specifically for this vignette).

In the long term we may need to revise our test data strategy. It seems that the time to load pharmaverseadam is increasing. We have observed this already in the Roche-internal syntheticadam package. Do we really need more than 300 subjects? For the ADaM websites it results in long loading times but who want to scroll through hundred of subjects in the examples? A few subjects (like in the admiralonco vignettes) to show the interesting scenarios should be sufficient. However, for TLGs it's different. Summaries with eight subjects doesn't make sense and give strange looking results.

@bms63 , @manciniedoardo , what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure on the pharmaverseadam side - is there a better way to store the data? like a different format?

shall we put this in - pharmaverse/admiral#2971 ?

Choose a reason for hiding this comment

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

Tagging @Fanny-Gautier as the maintainer

Copy link
Collaborator

Choose a reason for hiding this comment

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

{pharmaversesdtm} will soon be updated including .csv files. Would it be faster to also save the {pharmaverseadam} datasets as .csv?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't know if .csv files can be loaded faster. However, in .csv files everything is text, i.e., additional logic is required for numeric, date, datetime, and time variables. Most likely we would need metadata to load the .csv with the correct type and label.

Copy link
Collaborator

Choose a reason for hiding this comment

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

is .csv something other data packages do - I have not seen that before. If we are worried about speed maybe parquet should be looked at??

```

> **Note on CNSR coding:** In CDISC ADTTE, `CNSR = 0` indicates an **event**
> and `CNSR = 1` indicates **censoring**. `Surv_CNSR(AVAL, CNSR)` handles this
Copy link
Collaborator

Choose a reason for hiding this comment

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

CDISC recommends using values >= 1 for censoring. Currently this is not covered by Surv_CNSR() (I've created an issue suggesting to enhance it).

Comment on lines +231 to +236
mutate(label = recode(label,
"0.25" = "3 months",
"0.5" = "6 months",
"0.75" = "9 months",
"1" = "12 months"
))
Copy link
Collaborator

Choose a reason for hiding this comment

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

These labels are not displayed:

Image

Comment on lines +260 to +271
adtte_pfs |>
cardx::ard_survival_survfit(
y = "Surv_CNSR(AVAL, CNSR)",
probs = 0.5
)

# Time-point survival probability ARD
adtte_pfs |>
cardx::ard_survival_survfit(
y = "Surv_CNSR(AVAL, CNSR)",
times = c(0.25, 0.5, 0.75, 1)
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to display the result of these calls?

@rossfarrugia rossfarrugia removed their request for review February 25, 2026 09:41
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.

Add Onco Table and Plot examples

6 participants