Skip to content

Conversation

AlexisCochard
Copy link
Contributor

Première version de la vignette ORR

@AlexisCochard AlexisCochard linked an issue Apr 29, 2025 that may be closed by this pull request
4 tasks
@DanChaltiel
Copy link
Member

Merci pour ce premier draft, on avance c'est trop cool 😁

Petite roadmap pour cette PR :

  • On s'inspire de la vignette de Livia : https://oncostat.github.io/grstat/articles/kaplan_meier.html
    Le but est d'avoir à la fin un document clair et lisible par des débutants en stats / recherche clinique, qui connaissent R sans être des pros.
  • Il faut une approche problème -> solution. En première lecture ça m'a l'air pas mal :-).
  • Si c'est applicable, on peut montrer des checks à faire pour que l'utilisateur vérifie qu'il/elle n'a pas fait de bêtise.
  • Il faut que le lecteur puisse copier-coller le code pour l'adapter à son problème.
    Par conséquent, il faut le code le plus concis, donc DRY. L'IA peut aider, mais il faut vraiment que le code utilisé soit 100% compris et que l'output soit vérifié +++.
  • De préférence, on utilise le tidyverse exclusivement. Donc pas de crochets [], pas de sapply(). Idem, l'IA peut aider mais on fait attention.
  • On utilise au mieux la syntaxe markdown, notamment les backticks ` (AltGr+è puis espace sur un clavier français)
  • Il faut utiliser le moins possible de packages externes, car ça oblige l'utilisateur à l'installer pour installer notre package, et c'est une invitation aux embêtements en tous genres. C'est un peu contraignant je sais...
    Par exemple, tu utilises GenBinomApps pour faire tes intervalles de confiance, est-ce que c'est obligé ?
    On pourrait calculer des CI plus simples, et juste noter que la fonction GenBinomApps::clopper.pearson.ci() permet d'autres calculs. Ou alors récupérer leur code dans une fonction interne de grstat ?
  • Il faut modulariser le code en créant des fonctions (toujours le DRY). Par exemple, il faudrait une fonction report_orr(), ou flextable_orr() qui transformerait ton ouput dataframe en flextable. (peut-être pas les footnotes ?)

Pour mon dernier point, les fonctions doivent être dans un fichier R séparé (par exemple orr.R) qui sera load avec le grstat.

Copy link
Contributor

@Lpierott Lpierott left a comment

Choose a reason for hiding this comment

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

Bon travail! des petit choses a changer

# Introduction

This vignette illustrates the implementation of ORR analysis in R using `flextable` package. The ORR method is a standard approach in clinical research for estimating the percentage of people in a study or treatment group who have a partial response or complete response to the treatment within a certain period of time. A partial response is a decrease in the size of a tumor or in the amount of cancer in the body, and a complete response is the disappearance of all signs of cancer in the body. In a clinical trial, measuring the ORR is one way to see how well a new treatment works. Also called objective response rate.

Copy link
Contributor

Choose a reason for hiding this comment

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

This vignette demonstrates how to perform an Objective Response Rate (ORR) analysis in R using in R using flextable package. The ORR method is a standard approach in clinical research for estimating the percentage of patients in a study (i.e., one or more treatment groups) who experience a partial or complete response to treatment within a specified period. A partial response is a decrease in the size of a tumor or in the amount of cancer in the body compare to the baseline, and a complete response is the disappearance of all signs of cancer in the body. In a clinical trial, measuring the ORR is one way to see how well a new treatment works. Also called objective response rate.

Copy link
Member

Choose a reason for hiding this comment

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

Attention, il y a une petite confusion. On n'analyse pas l'ORR avec le package flextable, on analyse l'ORR avec des fonctions R diverses et variées, et on met le résultat dans une flextable.
Flextable n'est qu'un format de sortie comme un autre, on aurait pu utiliser gt, kable, ou tinytable pour une table HTML comme flextable, ou même partir sur un autre format comme un fichier Excel.

A terme, il était question de mettre l'appel à flextable dans une fonction pour avoir une sortie standardisée. A ce moment là, le lecteur de la vignette n'utilisera même plus flextable mais directement grstat 😊

bestresponse_withinprotocole=ifelse(previous_rcresp_num==rcresp_num, 1, 0 ),
.by = subjid
)

Copy link
Contributor

Choose a reason for hiding this comment

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

Would that be possible to just have done it in one go? so that no need to do in two steps i.e:recist_2 and unconfirmed_best_response but only in one go unconfirmed_best_response

```

Finally, we will use the `flextable` package for a table of results

Copy link
Contributor

Choose a reason for hiding this comment

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

Display results using flextable package


```{r}
total <- length(unique(final_unconfirmed_best_response$subjid))
CR_unconfirmed <- length(final_unconfirmed_best_response$rcresp[final_unconfirmed_best_response$rcresp == "Complete response"])
Copy link
Contributor

Choose a reason for hiding this comment

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

Problem avec les total count, il faut changer a ca pour tous a mon avis, please check. merci
CR_confirmed_her2_0 <- length(her2_0$RCRESP[her2_0$RCRESP == "Complete response" & !is.na(her2_0$RCRESP)])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

je filtre quelques lignes avant (dans la def recist_2) dans le code uniquement ceux qui ne sont pas NA en rcresp donc est-ce que c'est quand même utile de rajouter ici le !is.na(her2_0$RCRESP) ?

round(SD_unconfirmed/total*100,1),
round(PD_unconfirmed/total*100,1),
round(NE_unconfirmed/total*100,1))

Copy link
Contributor

@Lpierott Lpierott Jul 1, 2025

Choose a reason for hiding this comment

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

That whole chunk of code can be shortened. I am pretty sure. ask chat!

Comme ca est ce que ca marche? et comme Dan a conseille faire une function de la table.

compute_response_flextable <- function(
data,
response_column = "rcresp",
subject_id_column = "subjid",
table_title = "Unconfirmed Best Response during treatment"
) {
library(flextable)
library(officer)
library(dplyr)

total <- length(unique(data[[subject_id_column]]))

responses <- c(
"Complete response",
"Partial response",
"Stable disease",
"Progressive disease",
"Not evaluable"
)
names(responses) <- c("CR", "PR", "SD", "PD", "NE")

counts <- sapply(responses, function(r)
sum(data[[response_column]] == r & !is.na(data[[response_column]]))
)

Overall_ORR <- counts["CR"] + counts["PR"]

ci_list <- lapply(c(Overall_ORR, counts), function(n)
clopper.pearson.ci(n, total, CI = "two.sided", alpha = 0.05)
)

ci_formatted <- sapply(ci_list, function(ci)
paste0("[", round(ci$Lower.limit * 100, 1), ";", round(ci$Upper.limit * 100, 1), "]")
)

percentages <- round(c(Overall_ORR, counts) / total * 100, 1)

names_display <- c(
"Overall ORR",
"Complete response (CR)",
"Partial response (PR)",
"Stable disease (SD)",
"Progressive disease (PD)",
"Non evaluable (NE)"
)

result_df <- data.frame(
Name = names_display,
N = c(Overall_ORR, counts),
Percentage = percentages,
IC 95% = ci_formatted,
stringsAsFactors = FALSE
)

colnames(result_df) <- c(
table_title,
paste0("N=", total),
"%",
"IC 95%"
)

ft <- result_df %>%
flextable() %>%
bold(i = 1, j = 1, bold = TRUE, part = "body") %>%
bold(bold = TRUE, part = "header") %>%
surround(i = 1, j = 1:4,
border.bottom = fp_border(color = "black", style = "solid", width = 1),
part = "body") %>%
footnote(
i = 1, j = 4,
value = as_paragraph(
"Clopper-Pearson (Exact) method was used for confidence interval"
),
ref_symbols = "*",
part = "header"
) %>%
footnote(
i = 6, j = 1,
value = as_paragraph(
"Example: Patient 129 had NE as her global response for target lesion was NE."
),
ref_symbols = "1",
part = "body"
) %>%
valign(valign = "bottom", part = "header")

return(ft)
}

my_flextable <- compute_response_flextable(final_unconfirmed_best_response)
my_flextable

Copy link
Contributor

Choose a reason for hiding this comment

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

Vous avez regarder ce que j avais essayer un peu de faire au dessus? j ai compris que du coup vous avez decide de faire une function qui calcul les ORR automatiquement depuis RECIST data. Je pensais que a la reunion grstat on avait decide avec Matthieu que c etait pas une bonne idee de faire ca car chaque protocol est different etc... et donc l'idee de d'expliquer comment calculer les ORR dans une vignette et presenter les ORR dans une table etait plus favorable. please let me know.

Copy link
Member

Choose a reason for hiding this comment

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

A notre dernière réunion avec Matthieu, on avait remarqué que la fonction waterfall-plot devait être séparée en une fonction qui calcule la best response et une qui plot le resultat.
C'est ce que j'ai fait dans #71 (issue #19).
C'est vrai qu'on a beaucoup dit qu'on ne voulait pas de fonction toute faite, mais il faut croire qu'on tend quand même vers ça...

Sauf qu'en fait, best response c'est l'ORR, je n'avais pas bien compris les termes (pour moi ORR c'était réponse à 1an par exemple).
Donc en discutant avec Alexis, on s'est rendus compte que le travail avait été fait en double, et qu'il fallait fusionner les deux.
C'est super car ça va permettre d'intégrer l'option "confirmed" aux waterfall plots!

Ca n'empêche qu'il faudra tout expliquer dans la vignette !


## Data Overview

To calculate the ORR, we'll use the “recist” dataset.
Copy link
Contributor

Choose a reason for hiding this comment

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

we will and not we'll. I think is too informal the we'll.



#Since we have 2 arms, we will first creae the part of the control

Copy link
Contributor

Choose a reason for hiding this comment

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

Please see the code above and check and see if we can apply it here too

Copy link
Member

@DanChaltiel DanChaltiel left a comment

Choose a reason for hiding this comment

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

Je t'ai fait une review éclair vu qu'on se voit demain.
Je n'ai pas eu le temps de tester sur les données, j'essaierai demain matin, mais ça a l'air super :-)

Au fait attention, il y a survfit_stack.R qui s'est glissé dans ta branche, je ne sais pas pourquoi mais ça risque de faire des bugs quand on va merger

R/ORR_table.R Outdated
#' @importFrom cli cli_abort

ORR_table = function(id = recist$SUBJID, global_response = recist$RCRESP, date = recist$RCDT, confirmed = FALSE, show_CBR = FALSE){
`%notin%` <- Negate(`%in%`)
Copy link
Member

Choose a reason for hiding this comment

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

Il y a vraiment besoin d'un opérateur en plus ?

if(x %notin% b) ...
if(! x %in% b) ...

R/ORR_table.R Outdated
if(length(show_CBR) > 1){
cli_abort("show_CBR shoulb be TRUE or FALSE (default = FALSE)")
}
if(confirmed %notin% c(TRUE,FALSE,NA)){
Copy link
Member

Choose a reason for hiding this comment

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

tu peux utiliser les fonctions du fichier assertion.R
Par exemple ici assert_class(confirmed, "numeric")

R/ORR_table.R Outdated
#' @importFrom officer fp_border
#' @importFrom cli cli_abort

ORR_table = function(id = recist$SUBJID, global_response = recist$RCRESP, date = recist$RCDT, confirmed = FALSE, show_CBR = FALSE){
Copy link
Member

Choose a reason for hiding this comment

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

Dans grstat, on utilise des interfaces tidyverse, pas base R comme ici
ça veut dire que le premier argument est quasi toujours une dataframe
donc il vaut mieux avoir dans tes arguments d'abord data, puis un moyen d'identifier les colonnes, par exemple subjid="SUBJID", resp="RCRESP".

Attention, tes valeurs par défaut attendent qu'un objet recist existe, ce qui fera planter la fonction dans quasi tous les cas de figures réels.

R/ORR_table.R Outdated
#Si un patient a une seule visite recist (la premiere) puis aucune autre, on le modifie en Not evaluable
data = data %>%
distinct(subjid,rcresp,rcdt) %>%
arrange(as.numeric(subjid), rcdt) %>%
Copy link
Member

Choose a reason for hiding this comment

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

cette ligne plantera dans toutes les études où SUBJID n'est pas numérique

R/ORR_table.R Outdated
mutate(n = n(), .by = subjid) %>%
mutate(rcresp = ifelse(n==1, "Not evaluable",as.character(rcresp)))

data$rcresp <- factor(data$rcresp, levels = c("Complete response", "Partial response", "Stable disease", "Progressive disease", "Not evaluable"))
Copy link
Member

Choose a reason for hiding this comment

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

Au secours, du base R 😱😱

R/ORR_table.R Outdated
filter(bestresponse==rcresp_num) %>%
slice_head(by=subjid) %>%
mutate(Overall_ORR= ifelse(rcresp=="Complete response" | rcresp=="Partial response",1,0),
CBR = ifelse(duree_suivi_max >= 152 | rcresp=="Complete response" | rcresp=="Partial response",1,0))
Copy link
Member

Choose a reason for hiding this comment

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

Pourquoi 152 ?
C'est une valeur fixe pour toutes les études ?
Sinon il faudrait l'ajouter en argument non ?

R/ORR_table.R Outdated
Comment on lines 105 to 128
total <- length(unique(final_best_response$subjid))
CR <- length(final_best_response$rcresp[final_best_response$rcresp == "Complete response"])
PR <- length(final_best_response$rcresp[final_best_response$rcresp == "Partial response"])
SD <- length(final_best_response$rcresp[final_best_response$rcresp == "Stable disease"])
PD <- length(final_best_response$rcresp[final_best_response$rcresp == "Progressive disease"])
NE <- length(final_best_response$rcresp[final_best_response$rcresp == "Not evaluable"])
Overall_ORR <- CR + PR
CBR <- length(final_best_response$CBR[final_best_response$CBR==1])

CR_CP <- clopper.pearson.ci(CR,total,CI="two.sided", alpha = 0.05)
PR_CP <- clopper.pearson.ci(PR,total,CI="two.sided", alpha = 0.05)
SD_CP <- clopper.pearson.ci(SD,total,CI="two.sided", alpha = 0.05)
PD_CP <- clopper.pearson.ci(PD,total,CI="two.sided", alpha = 0.05)
NE_CP <- clopper.pearson.ci(NE,total,CI="two.sided", alpha = 0.05)
Overall_ORR_CP <- clopper.pearson.ci(Overall_ORR,total,CI="two.sided", alpha = 0.05)
CBR_CP <- clopper.pearson.ci(CBR,total,CI="two.sided", alpha = 0.05)

CR_CP_IC <- paste0("[",round(CR_CP$Lower.limit*100,1),";",round(CR_CP$Upper.limit*100,1),"]")
PR_CP_IC <- paste0("[",round(PR_CP$Lower.limit*100,1),";",round(PR_CP$Upper.limit*100,1),"]")
SD_CP_IC <- paste0("[",round(SD_CP$Lower.limit*100,1),";",round(SD_CP$Upper.limit*100,1),"]")
PD_CP_IC <- paste0("[",round(PD_CP$Lower.limit*100,1),";",round(PD_CP$Upper.limit*100,1),"]")
NE_CP_IC <- paste0("[",round(NE_CP$Lower.limit*100,1),";",round(NE_CP$Upper.limit*100,1),"]")
Overall_ORR_CP_IC <- paste0("[",round(Overall_ORR_CP$Lower.limit*100,1),";",round(Overall_ORR_CP$Upper.limit*100,1),"]")
CBR_CP_IC <- paste0("[",round(CBR_CP$Lower.limit*100,1),";",round(CBR_CP$Upper.limit*100,1),"]")
Copy link
Member

Choose a reason for hiding this comment

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

Attention, beaucoup de baseR et beaucoup de répétitions (DRY), donc risque d'erreur et mauvaise maintenabilité.

final_best_response %>% mutate(total=n()) %>% count(rcresp) devrait être un début, faudrait que je teste pour le reste. On voit ensemble si besoin évidemment :-)

R/ORR_table.R Outdated
Comment on lines 131 to 136
IC_95 <- c(Overall_ORR_CP_IC,
CR_CP_IC,
PR_CP_IC,
SD_CP_IC,
PD_CP_IC,
NE_CP_IC)
Copy link
Member

Choose a reason for hiding this comment

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

Bon alors là je vais dire le contraire, c'est un peu trop aéré 😂
Si ça prend trop de lignes c'est aussi difficile à lire.

R/ORR_table.R Outdated

colnames(Best_Response_during_treatment) <- nom_col
Best_Response_during_treatment = Best_Response_during_treatment %>%
as_flextable(show_coltype = F, include.row_percent = FALSE, include.column_percent = FALSE, include.table_percent = FALSE) %>%
Copy link
Member

Choose a reason for hiding this comment

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

Best_Response_during_treatment est une dataframe, donc à mon avis as_flextable() est plus galère que simplement flextable().

}

colnames(Best_Response_during_treatment) <- nom_col
Best_Response_during_treatment = Best_Response_during_treatment %>%
Copy link
Member

Choose a reason for hiding this comment

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

Il faut toujours séparer le fond et la forme.
Ca veut dire qu'il faut toujours une fonction qui fabrique les données (dataframe) et une fonction qui les affiche (flextable).
Ca implique de faire un peu de programmation orientée objet, on voit ça ensemble.

This reverts commit 632fb01.
This reverts commit 15a2cff.
commit f220fb5
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Fri Jul 18 14:08:20 2025 +0000

    Update dev version (Github Actions)

    Bump to v0.1.0.9015
    [skip ci]

commit 972e13e
Author: Lpierott <pierotti.livia@gmail.com>
Date:   Fri Jul 18 16:06:01 2025 +0200

    Improve KaplanMeier vignette (#74)

    * Create kaplan_meier_v2.Rmd

    * remove v2 to the name of the rmd script

commit 6f32680
Author: Dan Chaltiel <dan.chaltiel@gmail.com>
Date:   Tue Jul 15 10:08:48 2025 +0200

    Delete .github/ISSUE_TEMPLATE directory

    [skip ci]

commit bf2d483
Author: Dan Chaltiel <dan.chaltiel@gmail.com>
Date:   Sat Jul 12 14:09:51 2025 +0200

    Waterfallplot: séparation calcul réponse / plot (#71)

    * removed worst_resp calculation!

    * isolate calc_best_response()

    * add .remove_post_pd()

    * improve/fix inner checks

    * isolate .encode_response

    * use slice_min instead of filter for better tie management

    * output: select and rename

    +clean
    +add ellipsis argument

    * grstat_data_warn default subjid

    * doc

    * waterfall: change interface

    from raw recist to best response

    * add .check_legacy()

    error message to signal the function has changed

    * add .get_shape_layer()

    more versatile than stars

    * add .get_fill_scale()

    get fill colors from parameter "resp_colors"

    * clean labs and theme

    * doc

    * autoimport

    * add tests

    * signal dev lifecycle

    * grstat_dev_warn: add verbosity control for tests

    * improve globalVariables management

    * fixes for check

    * grstat_dev_warn fix

    * Squashed commit of the following:

    commit 63d0d15
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Fri Jul 11 16:07:16 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9013
        [skip ci]

    commit f95b324
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Fri Jul 11 18:06:07 2025 +0200

        Implémenter les checks RECIST (#63)

        * WIP

        * recist_check: .add_to_recist_issues() instead of warn

        use an environment to centralize the issues instead of warning for each.
        + heavy reformat (should have made 2 commits...)

        * recist_check reorder

        * check_recist: .apply_recist_mapping()

        * check_lesion_number()

        * fixed .apply_recist_mapping

        * check_constancy

        * check_baseline_lesions

        * hotfix: add rtn objects

        * check_constancy: Response should be constant per date

        * check_baseline_lesions: baseline response should be missing

        * check_derived_columns

        * check_lesion_number() becomes check_target_lesions()

        * check_missing

        * check_target_response

        * fix check_missing

        * check_constancy: add nontarget_yn

        * check_target_response (for real)

        * check_global_response

        * .summarise_recist (for rc_short)

        * move utils to utils.R

        * check_global_response: fix arguments

        * .apply_recist_mapping: add mandatory variables

        * recist_issue: allow newline in message

        * backup commit

        * remove old code

        OLD_check_bare_recist
        OLD_check_response
        FIX_check_crf_structure

        * check_nontarget_response

        Patients with no Non-Target Lesions should not have a NTL response.

        * check_global_response: check NTL progressions

        Progressions due only to Non-Target Lesions are seldom and should be checked

        * remove legacy code

        * print.check_recist

        * remove unused grstat_env

        * gr_recist_mapping: remove unused variables

        * print.check_recist : nicer

        * document

        * check_recist: add mapping as attribute

        * rephrase most issue messages

        * recist_report() !!!

        * autoimport

        * check_derived_columns: conditional checks

        * improve documentation

        * Update _pkgdown.yml

        * recist_report: add title parameter

        * Delete test-recist.R

        * add globalVariables

        * fix for check

        * check_derived_columns: deduplicate checks

        * check_global_response: fix nlt-only progressions

        * template recist: improve options

        remove rownames, remove research

        * add assert_extension()

        * recist_report: split into HTML and XLSX

        * move to recist_utils.R

        * renamed to .recist_to_num() (and improved)

        * Remove rows posterior to the first progression

        * rewrote error messages

        * check that CR are terminal

        * check: Target Lesion should be <2 lymph nodes

        * signal dev state

        improves #69

        * clean browser() reliquates

        * Update .gitignore

        * check_global_response: fix NA/NE

        * improve globalVariables() management

        * improve doc

        * fix for check

        * Update .gitignore

        * remove nonsensical check

        nadir can evolve over time, obviously

        * prefix internal check function with rc_

        * add some tests

        * Update _pkgdown.yml

        * update doc

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    commit 48afe41
    Author: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>
    Date:   Fri Jul 11 14:05:35 2025 +0200

        changed check action

        [skip ci]

    commit 33dd5ee
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Fri Jul 11 10:36:13 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9012
        [skip ci]

    commit 68d87be
    Author: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>
    Date:   Fri Jul 11 12:35:04 2025 +0200

        Update check-standard.yaml

    commit 42db0f2
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Fri Jul 11 12:07:07 2025 +0200

        add BOIN plot (#77)

        * add boin plot

        * autoimport

        * doc

        * add tests

        * Update _pkgdown.yml

        * fix for check

        * legend inside the gantt plot

        * clean unused variable

        * use boin$boundary_tab if full_boundary_tab is not available

        * improve documentation

        * update tests with newer example

        * fix for check

        * renamed data_patients columns + doc

        * test: check for unknown dose

        * typo

        * update tests

        * Update .gitignore

        * add experimental badge

        * update globals

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    commit ebbf206
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Wed Jul 9 15:52:32 2025 +0200

        Update check-standard.yaml

        [skip ci]

    commit a65605f
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Wed Jul 9 09:13:24 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9011
        [skip ci]

    commit 05b7e51
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Wed Jul 9 11:11:56 2025 +0200

        Improve recist data (#75)

        * better arm repartition

        * improve date_inclusion calculation

        * improve documentation

        * example_rc: removed rctlsum_b & rctlmin

        * moved test-alexis.R to test-data.R

        * example_rc: add NTL yesno column `rcntlyn`

        NTL are NE mostly when non present

        * example_rc: fixed labels

        bind_rows removed them, added at last

        * improved documentation

        * example_rc: reformat

        * add .sample_yesno()

        * example_rc: improve workflow

        * example_rc: fix number of timepoints

        baseline was added

        * example_rc: removed unused variables

        * example_rc: minor reformat, renaming, and doc

        * example_rc: internalise things inside .simulate_one_patient()

        rctlsum_b + calculate rcdt from delai

        example_rc: simulate baseline inside .simulate_one_patient()

        also, decrease linearly (% of baseline) instead of exponentially (% of previous date) for simplicity

        * example_rc: revert baseline being not missing

        +response factor level management

        * example_rc: tweak default values

        * add tests on RECIST data (survival rates...)

        * add dev tests on RECIST (skipped, for viz only)

        * fix for check

        * add missing values

        * update doc

        * add NA/NE for real this time

        * update test for NE values

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    * Update _pkgdown.yml

    * Squashed commit of the following:

    commit a304e92
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Fri Jul 11 16:58:20 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9014
        [skip ci]

    commit 165566a
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Fri Jul 11 18:56:53 2025 +0200

        new gr_officer_template() (#72)

        * new gr_officer_template()

        * doc

        * Update _pkgdown.yml

        * autoimport

        * fix for check

        * update globals

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    commit 63d0d15
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Fri Jul 11 16:07:16 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9013
        [skip ci]

    commit f95b324
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Fri Jul 11 18:06:07 2025 +0200

        Implémenter les checks RECIST (#63)

        * WIP

        * recist_check: .add_to_recist_issues() instead of warn

        use an environment to centralize the issues instead of warning for each.
        + heavy reformat (should have made 2 commits...)

        * recist_check reorder

        * check_recist: .apply_recist_mapping()

        * check_lesion_number()

        * fixed .apply_recist_mapping

        * check_constancy

        * check_baseline_lesions

        * hotfix: add rtn objects

        * check_constancy: Response should be constant per date

        * check_baseline_lesions: baseline response should be missing

        * check_derived_columns

        * check_lesion_number() becomes check_target_lesions()

        * check_missing

        * check_target_response

        * fix check_missing

        * check_constancy: add nontarget_yn

        * check_target_response (for real)

        * check_global_response

        * .summarise_recist (for rc_short)

        * move utils to utils.R

        * check_global_response: fix arguments

        * .apply_recist_mapping: add mandatory variables

        * recist_issue: allow newline in message

        * backup commit

        * remove old code

        OLD_check_bare_recist
        OLD_check_response
        FIX_check_crf_structure

        * check_nontarget_response

        Patients with no Non-Target Lesions should not have a NTL response.

        * check_global_response: check NTL progressions

        Progressions due only to Non-Target Lesions are seldom and should be checked

        * remove legacy code

        * print.check_recist

        * remove unused grstat_env

        * gr_recist_mapping: remove unused variables

        * print.check_recist : nicer

        * document

        * check_recist: add mapping as attribute

        * rephrase most issue messages

        * recist_report() !!!

        * autoimport

        * check_derived_columns: conditional checks

        * improve documentation

        * Update _pkgdown.yml

        * recist_report: add title parameter

        * Delete test-recist.R

        * add globalVariables

        * fix for check

        * check_derived_columns: deduplicate checks

        * check_global_response: fix nlt-only progressions

        * template recist: improve options

        remove rownames, remove research

        * add assert_extension()

        * recist_report: split into HTML and XLSX

        * move to recist_utils.R

        * renamed to .recist_to_num() (and improved)

        * Remove rows posterior to the first progression

        * rewrote error messages

        * check that CR are terminal

        * check: Target Lesion should be <2 lymph nodes

        * signal dev state

        improves #69

        * clean browser() reliquates

        * Update .gitignore

        * check_global_response: fix NA/NE

        * improve globalVariables() management

        * improve doc

        * fix for check

        * Update .gitignore

        * remove nonsensical check

        nadir can evolve over time, obviously

        * prefix internal check function with rc_

        * add some tests

        * Update _pkgdown.yml

        * update doc

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    commit 48afe41
    Author: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>
    Date:   Fri Jul 11 14:05:35 2025 +0200

        changed check action

        [skip ci]

    commit 33dd5ee
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Fri Jul 11 10:36:13 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9012
        [skip ci]

    commit 68d87be
    Author: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>
    Date:   Fri Jul 11 12:35:04 2025 +0200

        Update check-standard.yaml

    commit 42db0f2
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Fri Jul 11 12:07:07 2025 +0200

        add BOIN plot (#77)

        * add boin plot

        * autoimport

        * doc

        * add tests

        * Update _pkgdown.yml

        * fix for check

        * legend inside the gantt plot

        * clean unused variable

        * use boin$boundary_tab if full_boundary_tab is not available

        * improve documentation

        * update tests with newer example

        * fix for check

        * renamed data_patients columns + doc

        * test: check for unknown dose

        * typo

        * update tests

        * Update .gitignore

        * add experimental badge

        * update globals

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    commit ebbf206
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Wed Jul 9 15:52:32 2025 +0200

        Update check-standard.yaml

        [skip ci]

    commit a65605f
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Wed Jul 9 09:13:24 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9011
        [skip ci]

    commit 05b7e51
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Wed Jul 9 11:11:56 2025 +0200

        Improve recist data (#75)

        * better arm repartition

        * improve date_inclusion calculation

        * improve documentation

        * example_rc: removed rctlsum_b & rctlmin

        * moved test-alexis.R to test-data.R

        * example_rc: add NTL yesno column `rcntlyn`

        NTL are NE mostly when non present

        * example_rc: fixed labels

        bind_rows removed them, added at last

        * improved documentation

        * example_rc: reformat

        * add .sample_yesno()

        * example_rc: improve workflow

        * example_rc: fix number of timepoints

        baseline was added

        * example_rc: removed unused variables

        * example_rc: minor reformat, renaming, and doc

        * example_rc: internalise things inside .simulate_one_patient()

        rctlsum_b + calculate rcdt from delai

        example_rc: simulate baseline inside .simulate_one_patient()

        also, decrease linearly (% of baseline) instead of exponentially (% of previous date) for simplicity

        * example_rc: revert baseline being not missing

        +response factor level management

        * example_rc: tweak default values

        * add tests on RECIST data (survival rates...)

        * add dev tests on RECIST (skipped, for viz only)

        * fix for check

        * add missing values

        * update doc

        * add NA/NE for real this time

        * update test for NE values

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    * deduplicate `.remove_post_pd()`

    * update globals

    * .check_best_resp: consider NE as NA

    * doc

    * update snapshots with new recist data

    * Squashed commit of the following:

    commit a304e92
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Fri Jul 11 16:58:20 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9014
        [skip ci]

    commit 165566a
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Fri Jul 11 18:56:53 2025 +0200

        new gr_officer_template() (#72)

        * new gr_officer_template()

        * doc

        * Update _pkgdown.yml

        * autoimport

        * fix for check

        * update globals

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    commit 63d0d15
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Fri Jul 11 16:07:16 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9013
        [skip ci]

    commit f95b324
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Fri Jul 11 18:06:07 2025 +0200

        Implémenter les checks RECIST (#63)

        * WIP

        * recist_check: .add_to_recist_issues() instead of warn

        use an environment to centralize the issues instead of warning for each.
        + heavy reformat (should have made 2 commits...)

        * recist_check reorder

        * check_recist: .apply_recist_mapping()

        * check_lesion_number()

        * fixed .apply_recist_mapping

        * check_constancy

        * check_baseline_lesions

        * hotfix: add rtn objects

        * check_constancy: Response should be constant per date

        * check_baseline_lesions: baseline response should be missing

        * check_derived_columns

        * check_lesion_number() becomes check_target_lesions()

        * check_missing

        * check_target_response

        * fix check_missing

        * check_constancy: add nontarget_yn

        * check_target_response (for real)

        * check_global_response

        * .summarise_recist (for rc_short)

        * move utils to utils.R

        * check_global_response: fix arguments

        * .apply_recist_mapping: add mandatory variables

        * recist_issue: allow newline in message

        * backup commit

        * remove old code

        OLD_check_bare_recist
        OLD_check_response
        FIX_check_crf_structure

        * check_nontarget_response

        Patients with no Non-Target Lesions should not have a NTL response.

        * check_global_response: check NTL progressions

        Progressions due only to Non-Target Lesions are seldom and should be checked

        * remove legacy code

        * print.check_recist

        * remove unused grstat_env

        * gr_recist_mapping: remove unused variables

        * print.check_recist : nicer

        * document

        * check_recist: add mapping as attribute

        * rephrase most issue messages

        * recist_report() !!!

        * autoimport

        * check_derived_columns: conditional checks

        * improve documentation

        * Update _pkgdown.yml

        * recist_report: add title parameter

        * Delete test-recist.R

        * add globalVariables

        * fix for check

        * check_derived_columns: deduplicate checks

        * check_global_response: fix nlt-only progressions

        * template recist: improve options

        remove rownames, remove research

        * add assert_extension()

        * recist_report: split into HTML and XLSX

        * move to recist_utils.R

        * renamed to .recist_to_num() (and improved)

        * Remove rows posterior to the first progression

        * rewrote error messages

        * check that CR are terminal

        * check: Target Lesion should be <2 lymph nodes

        * signal dev state

        improves #69

        * clean browser() reliquates

        * Update .gitignore

        * check_global_response: fix NA/NE

        * improve globalVariables() management

        * improve doc

        * fix for check

        * Update .gitignore

        * remove nonsensical check

        nadir can evolve over time, obviously

        * prefix internal check function with rc_

        * add some tests

        * Update _pkgdown.yml

        * update doc

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    commit 48afe41
    Author: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>
    Date:   Fri Jul 11 14:05:35 2025 +0200

        changed check action

        [skip ci]

    commit 33dd5ee
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Fri Jul 11 10:36:13 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9012
        [skip ci]

    commit 68d87be
    Author: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>
    Date:   Fri Jul 11 12:35:04 2025 +0200

        Update check-standard.yaml

    commit 42db0f2
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Fri Jul 11 12:07:07 2025 +0200

        add BOIN plot (#77)

        * add boin plot

        * autoimport

        * doc

        * add tests

        * Update _pkgdown.yml

        * fix for check

        * legend inside the gantt plot

        * clean unused variable

        * use boin$boundary_tab if full_boundary_tab is not available

        * improve documentation

        * update tests with newer example

        * fix for check

        * renamed data_patients columns + doc

        * test: check for unknown dose

        * typo

        * update tests

        * Update .gitignore

        * add experimental badge

        * update globals

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    commit ebbf206
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Wed Jul 9 15:52:32 2025 +0200

        Update check-standard.yaml

        [skip ci]

    commit a65605f
    Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Date:   Wed Jul 9 09:13:24 2025 +0000

        Update dev version (Github Actions)

        Bump to v0.1.0.9011
        [skip ci]

    commit 05b7e51
    Author: Dan Chaltiel <dan.chaltiel@gmail.com>
    Date:   Wed Jul 9 11:11:56 2025 +0200

        Improve recist data (#75)

        * better arm repartition

        * improve date_inclusion calculation

        * improve documentation

        * example_rc: removed rctlsum_b & rctlmin

        * moved test-alexis.R to test-data.R

        * example_rc: add NTL yesno column `rcntlyn`

        NTL are NE mostly when non present

        * example_rc: fixed labels

        bind_rows removed them, added at last

        * improved documentation

        * example_rc: reformat

        * add .sample_yesno()

        * example_rc: improve workflow

        * example_rc: fix number of timepoints

        baseline was added

        * example_rc: removed unused variables

        * example_rc: minor reformat, renaming, and doc

        * example_rc: internalise things inside .simulate_one_patient()

        rctlsum_b + calculate rcdt from delai

        example_rc: simulate baseline inside .simulate_one_patient()

        also, decrease linearly (% of baseline) instead of exponentially (% of previous date) for simplicity

        * example_rc: revert baseline being not missing

        +response factor level management

        * example_rc: tweak default values

        * add tests on RECIST data (survival rates...)

        * add dev tests on RECIST (skipped, for viz only)

        * fix for check

        * add missing values

        * update doc

        * add NA/NE for real this time

        * update test for NE values

        ---------

        Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

    * remove use of `\(` shorthand

    * fix for check

    ---------

    Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

commit a304e92
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Fri Jul 11 16:58:20 2025 +0000

    Update dev version (Github Actions)

    Bump to v0.1.0.9014
    [skip ci]

commit 165566a
Author: Dan Chaltiel <dan.chaltiel@gmail.com>
Date:   Fri Jul 11 18:56:53 2025 +0200

    new gr_officer_template() (#72)

    * new gr_officer_template()

    * doc

    * Update _pkgdown.yml

    * autoimport

    * fix for check

    * update globals

    ---------

    Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

commit 63d0d15
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Fri Jul 11 16:07:16 2025 +0000

    Update dev version (Github Actions)

    Bump to v0.1.0.9013
    [skip ci]

commit f95b324
Author: Dan Chaltiel <dan.chaltiel@gmail.com>
Date:   Fri Jul 11 18:06:07 2025 +0200

    Implémenter les checks RECIST (#63)

    * WIP

    * recist_check: .add_to_recist_issues() instead of warn

    use an environment to centralize the issues instead of warning for each.
    + heavy reformat (should have made 2 commits...)

    * recist_check reorder

    * check_recist: .apply_recist_mapping()

    * check_lesion_number()

    * fixed .apply_recist_mapping

    * check_constancy

    * check_baseline_lesions

    * hotfix: add rtn objects

    * check_constancy: Response should be constant per date

    * check_baseline_lesions: baseline response should be missing

    * check_derived_columns

    * check_lesion_number() becomes check_target_lesions()

    * check_missing

    * check_target_response

    * fix check_missing

    * check_constancy: add nontarget_yn

    * check_target_response (for real)

    * check_global_response

    * .summarise_recist (for rc_short)

    * move utils to utils.R

    * check_global_response: fix arguments

    * .apply_recist_mapping: add mandatory variables

    * recist_issue: allow newline in message

    * backup commit

    * remove old code

    OLD_check_bare_recist
    OLD_check_response
    FIX_check_crf_structure

    * check_nontarget_response

    Patients with no Non-Target Lesions should not have a NTL response.

    * check_global_response: check NTL progressions

    Progressions due only to Non-Target Lesions are seldom and should be checked

    * remove legacy code

    * print.check_recist

    * remove unused grstat_env

    * gr_recist_mapping: remove unused variables

    * print.check_recist : nicer

    * document

    * check_recist: add mapping as attribute

    * rephrase most issue messages

    * recist_report() !!!

    * autoimport

    * check_derived_columns: conditional checks

    * improve documentation

    * Update _pkgdown.yml

    * recist_report: add title parameter

    * Delete test-recist.R

    * add globalVariables

    * fix for check

    * check_derived_columns: deduplicate checks

    * check_global_response: fix nlt-only progressions

    * template recist: improve options

    remove rownames, remove research

    * add assert_extension()

    * recist_report: split into HTML and XLSX

    * move to recist_utils.R

    * renamed to .recist_to_num() (and improved)

    * Remove rows posterior to the first progression

    * rewrote error messages

    * check that CR are terminal

    * check: Target Lesion should be <2 lymph nodes

    * signal dev state

    improves #69

    * clean browser() reliquates

    * Update .gitignore

    * check_global_response: fix NA/NE

    * improve globalVariables() management

    * improve doc

    * fix for check

    * Update .gitignore

    * remove nonsensical check

    nadir can evolve over time, obviously

    * prefix internal check function with rc_

    * add some tests

    * Update _pkgdown.yml

    * update doc

    ---------

    Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

commit 48afe41
Author: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>
Date:   Fri Jul 11 14:05:35 2025 +0200

    changed check action

    [skip ci]

commit 33dd5ee
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Fri Jul 11 10:36:13 2025 +0000

    Update dev version (Github Actions)

    Bump to v0.1.0.9012
    [skip ci]

commit 68d87be
Author: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>
Date:   Fri Jul 11 12:35:04 2025 +0200

    Update check-standard.yaml

commit 42db0f2
Author: Dan Chaltiel <dan.chaltiel@gmail.com>
Date:   Fri Jul 11 12:07:07 2025 +0200

    add BOIN plot (#77)

    * add boin plot

    * autoimport

    * doc

    * add tests

    * Update _pkgdown.yml

    * fix for check

    * legend inside the gantt plot

    * clean unused variable

    * use boin$boundary_tab if full_boundary_tab is not available

    * improve documentation

    * update tests with newer example

    * fix for check

    * renamed data_patients columns + doc

    * test: check for unknown dose

    * typo

    * update tests

    * Update .gitignore

    * add experimental badge

    * update globals

    ---------

    Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>

commit ebbf206
Author: Dan Chaltiel <dan.chaltiel@gmail.com>
Date:   Wed Jul 9 15:52:32 2025 +0200

    Update check-standard.yaml

    [skip ci]

commit a65605f
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Wed Jul 9 09:13:24 2025 +0000

    Update dev version (Github Actions)

    Bump to v0.1.0.9011
    [skip ci]

commit 05b7e51
Author: Dan Chaltiel <dan.chaltiel@gmail.com>
Date:   Wed Jul 9 11:11:56 2025 +0200

    Improve recist data (#75)

    * better arm repartition

    * improve date_inclusion calculation

    * improve documentation

    * example_rc: removed rctlsum_b & rctlmin

    * moved test-alexis.R to test-data.R

    * example_rc: add NTL yesno column `rcntlyn`

    NTL are NE mostly when non present

    * example_rc: fixed labels

    bind_rows removed them, added at last

    * improved documentation

    * example_rc: reformat

    * add .sample_yesno()

    * example_rc: improve workflow

    * example_rc: fix number of timepoints

    baseline was added

    * example_rc: removed unused variables

    * example_rc: minor reformat, renaming, and doc

    * example_rc: internalise things inside .simulate_one_patient()

    rctlsum_b + calculate rcdt from delai

    example_rc: simulate baseline inside .simulate_one_patient()

    also, decrease linearly (% of baseline) instead of exponentially (% of previous date) for simplicity

    * example_rc: revert baseline being not missing

    +response factor level management

    * example_rc: tweak default values

    * add tests on RECIST data (survival rates...)

    * add dev tests on RECIST (skipped, for viz only)

    * fix for check

    * add missing values

    * update doc

    * add NA/NE for real this time

    * update test for NE values

    ---------

    Co-authored-by: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com>
Revert "suite modif dan"

This reverts commit 15a2cff.
@DanChaltiel
Copy link
Member

Je viens de voir, le commit 946a74c n'est pas du tout RGPD parce qu'on cite le numéro du patient et le nom de l'étude.
Il faut donc qu'on fasse une nouvelle branche, avec une nouvelle PR et qu'on repart de là.
On va perdre l'historique des commits mais c'est pas grave du tout.
On fait ça ensemble à mon retour la semaine prochaine, ne t'inquiète pas!

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.

Vignette : Calcul des ORR
3 participants