### Install admiralonco from GitHub Source: https://github.com/pharmaverse/admiralonco/blob/main/README.md Install the latest development version of admiralonco directly from GitHub. Ensure the 'pak' package is installed first. ```r if (!requireNamespace("pak", quietly = TRUE)) { install.packages("pak") } pak::pkg_install("pharmaverse/admiralonco", dependencies = TRUE) ``` -------------------------------- ### Install admiralonco from CRAN Source: https://github.com/pharmaverse/admiralonco/blob/main/README.md Use this command to install the stable version of the admiralonco package from CRAN. ```r install.packages("admiralonco") ``` -------------------------------- ### Complete ADRS Workflow Example in R Source: https://context7.com/pharmaverse/admiralonco/llms.txt This script demonstrates the full workflow for creating an ADRS dataset, including merging ADSL variables, filtering, deriving analysis dates and values, and generating analysis flags for various oncology parameters like Overall Response, Disease Progression, Response, and Best Overall Response. It utilizes functions from admiral, admiralonco, dplyr, lubridate, pharmaversesdtm, and pharmaverseadam. ```r library(admiral) library(admiralonco) library(dplyr) library(lubridate) library(pharmaversesdtm) library(pharmaverseadam) # Load source data data("adsl") data("rs_onco_recist") rs <- convert_blanks_to_na(rs_onco_recist) # Step 1: Merge ADSL variables and set up initial ADRS adsl_vars <- exprs(RANDDT) adrs <- derive_vars_merged(rs, dataset_add = adsl, new_vars = adsl_vars, by_vars = get_admiral_option("subject_keys")) # Step 2: Filter and set parameter details adrs <- adrs %>% filter(RSEVAL == "INVESTIGATOR" & RSTESTCD == "OVRLRESP") %>% mutate( PARAMCD = "OVR", PARAM = "Overall Response by Investigator", PARCAT1 = "Tumor Response", PARCAT2 = "Investigator", PARCAT3 = "RECIST 1.1" ) # Step 3: Derive ADT and AVALC/AVAL adrs <- adrs %>% derive_vars_dt(dtc = RSDTC, new_vars_prefix = "A", highest_imputation = "D", date_imputation = "last") %>% mutate(AVISIT = VISIT, AVALC = RSSTRESC, AVAL = aval_resp(AVALC)) # Step 4: Derive analysis flags worst_resp <- function(arg) { case_when(arg == "NE" ~ 1, arg == "CR" ~ 2, arg == "PR" ~ 3, arg == "SD" ~ 4, arg == "NON-CR/NON-PD" ~ 5, arg == "PD" ~ 6, TRUE ~ 0) } adrs <- adrs %>% restrict_derivation( derivation = derive_var_extreme_flag, args = params(by_vars = c(get_admiral_option("subject_keys"), exprs(ADT)), order = exprs(worst_resp(AVALC), RSSEQ), new_var = ANL01FL, mode = "last"), filter = !is.na(AVAL) & ADT >= RANDDT ) %>% derive_var_relative_flag( by_vars = get_admiral_option("subject_keys"), order = exprs(ADT, RSSEQ), new_var = ANL02FL, condition = AVALC == "PD", mode = "first", selection = "before", inclusive = TRUE ) # Step 5: Create source dataset for parameter derivations ovr <- filter(adrs, PARAMCD == "OVR" & ANL01FL == "Y" & ANL02FL == "Y") # Step 6: Derive all oncology parameters adrs <- adrs %>% # Progressive Disease derive_extreme_records( dataset_ref = adsl, dataset_add = adrs, by_vars = get_admiral_option("subject_keys"), filter_add = PARAMCD == "OVR" & AVALC == "PD" & ANL01FL == "Y", order = exprs(ADT), mode = "first", exist_flag = AVALC, false_value = "N", set_values_to = exprs(PARAMCD = "PD", PARAM = "Disease Progression", AVAL = yn_to_numeric(AVALC), ANL01FL = "Y") ) %>% # Response derive_extreme_event( by_vars = get_admiral_option("subject_keys"), order = exprs(event_nr, ADT), tmp_event_nr_var = event_nr, mode = "first", events = list(rsp_y, no_data_n), source_datasets = list(ovr = ovr, adsl = adsl), set_values_to = exprs(PARAMCD = "RSP", PARAM = "Response by Investigator", AVAL = yn_to_numeric(AVALC), ANL01FL = "Y") ) %>% # Best Overall Response derive_extreme_event( by_vars = get_admiral_option("subject_keys"), order = exprs(event_nr, ADT), tmp_event_nr_var = event_nr, mode = "first", events = list(bor_cr, bor_pr, bor_sd, bor_non_crpd, bor_pd, bor_ne, no_data_missing), source_datasets = list(ovr = ovr, adsl = adsl), set_values_to = exprs(PARAMCD = "BOR", PARAM = "Best Overall Response", AVAL = aval_resp(AVALC), ANL01FL = "Y") ) %>% # Assign ASEQ derive_var_obs_number( by_vars = get_admiral_option("subject_keys"), order = exprs(PARAMCD, ADT, VISITNUM), check_type = "error" ) # Final result: ADRS with OVR, PD, RSP, BOR parameters ``` -------------------------------- ### Install Admiral Onco Source: https://context7.com/pharmaverse/admiralonco/llms.txt Install the package from CRAN or the development version from GitHub using the pak package. ```r # Install from CRAN install.packages("admiralonco") # Install development version from GitHub if (!requireNamespace("pak", quietly = TRUE)) { install.packages("pak") } pak::pkg_install("pharmaverse/admiralonco", dependencies = TRUE) ``` -------------------------------- ### Derive Time-to-Event Parameters Source: https://context7.com/pharmaverse/admiralonco/llms.txt Use pre-defined event_source and censor_source objects with derive_param_tte() to create OS and PFS parameters. ```r library(admiralonco) library(admiral) # Available TTE source objects: # Event sources: death_event, pd_event # Censor sources: lastalive_censor, lasta_censor, rand_censor, trts_censor # Print definition of death_event print(death_event) # event_source( # dataset_name = "adrs", # filter = PARAMCD == "DEATH" & AVALC == "Y" & ANL01FL == "Y", # date = ADT, # set_values_to = exprs( # EVNTDESC = "Death", # SRCDOM = "ADRS", # SRCVAR = "ADT", # SRCSEQ = ASEQ # ) # ) # Derive Overall Survival parameter using pre-defined objects adtte <- derive_param_tte( dataset_adsl = adsl, source_datasets = list(adsl = adsl, adrs = adrs), start_date = RANDDT, event_conditions = list(death_event), censor_conditions = list(lastalive_censor), set_values_to = exprs( PARAMCD = "OS", PARAM = "Overall Survival" ) ) # Derive Progression-Free Survival using multiple events adtte <- derive_param_tte( dataset_adsl = adsl, source_datasets = list(adsl = adsl, adrs = adrs), start_date = RANDDT, event_conditions = list(pd_event, death_event), censor_conditions = list(lasta_censor, rand_censor), set_values_to = exprs( PARAMCD = "PFS", PARAM = "Progression-Free Survival" ) ) ``` -------------------------------- ### Derive Confirmed Response Parameters Source: https://context7.com/pharmaverse/admiralonco/llms.txt Defines custom confirmation events and derives the confirmed response parameter using event_joined and derive_extreme_event. ```r library(admiralonco) library(admiral) library(dplyr) # Define study-specific confirmation period (default is 28 days) confirmation_period <- 21 # Create custom confirmed response events with study-specific confirmation window crsp_y_cr <- event_joined( description = paste( "Define confirmed response as CR followed by CR at least", confirmation_period, "days later and at most one NE in between" ), dataset_name = "ovr", join_vars = exprs(AVALC, ADT), join_type = "after", order = exprs(ADT), first_cond_upper = AVALC.join == "CR" & ADT.join >= ADT + days(confirmation_period), condition = AVALC == "CR" & all(AVALC.join %in% c("CR", "NE")) & count_vals(var = AVALC.join, val = "NE") <= 1, set_values_to = exprs(AVALC = "Y") ) crsp_y_pr <- event_joined( description = paste( "Define confirmed response as PR followed by CR or PR at least", confirmation_period, "days later, at most one NE in between, and no PR after CR" ), dataset_name = "ovr", join_vars = exprs(AVALC, ADT), join_type = "after", order = exprs(ADT), first_cond_upper = AVALC.join %in% c("CR", "PR") & ADT.join >= ADT + days(confirmation_period), condition = AVALC == "PR" & all(AVALC.join %in% c("CR", "PR", "NE")) & count_vals(var = AVALC.join, val = "NE") <= 1 & (min_cond(var = ADT.join, cond = AVALC.join == "CR") > max_cond(var = ADT.join, cond = AVALC.join == "PR") | count_vals(var = AVALC.join, val = "CR") == 0 | count_vals(var = AVALC.join, val = "PR") == 0), set_values_to = exprs(AVALC = "Y") ) # Derive Confirmed Response parameter adrs <- adrs %>% derive_extreme_event( by_vars = get_admiral_option("subject_keys"), order = exprs(desc(AVALC), ADT, event_nr), tmp_event_nr_var = event_nr, mode = "first", source_datasets = list(ovr = ovr, adsl = adsl), events = list(crsp_y_cr, crsp_y_pr, no_data_n), set_values_to = exprs( PARAMCD = "CRSP", PARAM = "Confirmed Response by Investigator", PARCAT1 = "Tumor Response", PARCAT2 = "Investigator", PARCAT3 = "RECIST 1.1", AVAL = yn_to_numeric(AVALC), ANL01FL = "Y" ) ) ``` -------------------------------- ### Handle deprecation warning for derive_param_confirmed_resp Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/derive_param_confirmed_resp.md Demonstrates the deprecation message issued when calling the function, advising migration to admiral::derive_extreme_event. ```R suppress_warning(actual <- derive_param_confirmed_resp(adrs, dataset_adsl = adsl, filter_source = PARAMCD == "OVR", source_pd = pd_date, source_datasets = list( adrs = adrs), ref_confirm = 28, set_values_to = exprs(AVAL = yn_to_numeric( AVALC), PARAMCD = "CRSP", PARAM = "Confirmed Response by Investigator")), "Dataset contains CR records followed by PR") ``` -------------------------------- ### Derive Best Overall Response Source: https://context7.com/pharmaverse/admiralonco/llms.txt Utilize pre-defined event objects with derive_extreme_event() to calculate BOR parameters based on RECIST 1.1 criteria. ```r library(admiralonco) library(admiral) # View available pre-defined event objects # Response events: rsp_y, no_data_n, cb_y # BOR events: bor_cr, bor_pr, bor_sd, bor_non_crpd, bor_pd, bor_ne, no_data_missing # Confirmed response events: crsp_y_cr, crsp_y_pr, cbor_cr, cbor_pr # Print definition of an event object print(bor_cr) # event( # description = "Define complete response (CR) for best overall response (BOR)", # dataset_name = "ovr", # condition = AVALC == "CR", # set_values_to = exprs(AVALC = "CR") # ) # Use events to derive Best Overall Response parameter adrs <- adrs %>% derive_extreme_event( by_vars = get_admiral_option("subject_keys"), order = exprs(event_nr, ADT), tmp_event_nr_var = event_nr, mode = "first", source_datasets = list(ovr = ovr, adsl = adsl), events = list(bor_cr, bor_pr, bor_sd, bor_non_crpd, bor_pd, bor_ne, no_data_missing), set_values_to = exprs( PARAMCD = "BOR", PARAM = "Best Overall Response by Investigator", PARCAT1 = "Tumor Response", AVAL = aval_resp(AVALC), ANL01FL = "Y" ) ) ``` -------------------------------- ### Handle deprecation warning for derive_param_confirmed_bor Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/derive_param_confirmed_bor.md Shows the usage of the function while suppressing warnings, highlighting the deprecation notice for future migration to admiral::derive_extreme_event. ```R suppress_warning(actual <- derive_param_confirmed_bor(adrs, dataset_adsl = adsl, filter_source = PARAMCD == "OVR", source_pd = pd_date, source_datasets = list( adrs = adrs), reference_date = TRTSDT, ref_start_window = 28, ref_confirm = 28, set_values_to = exprs(AVAL = aval_resp(AVALC), PARAMCD = "CBOR", PARAM = "Best Confirmed Overall Response by Investigator")), "Dataset contains CR records followed by PR") ``` -------------------------------- ### Call deprecated derive_param_response Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/derive_param_response.md This snippet demonstrates calling the deprecated `derive_param_response` function. It will trigger a deprecation message and is recommended to be replaced with `admiral::derive_extreme_event`. ```R adrs %>% derive_param_response(dataset_adsl = adsl, filter_source = PARAMCD == "OVR" & AVALC %in% c("CR", "PR"), source_pd = NULL, source_datasets = NULL, set_values_to = exprs(AVAL = admiral::yn_to_numeric(AVALC), PARAMCD = "RSP", PARAM = "Response by investigator"), subject_keys = get_admiral_option( "subject_keys")) ``` -------------------------------- ### Map Response Values to Numeric Source: https://context7.com/pharmaverse/admiralonco/llms.txt Use aval_resp() to convert character response values to numeric for AVAL variable creation in ADRS datasets. ```r library(admiralonco) # Map character response values to numeric AVAL response_values <- c("CR", "PR", "SD", "NON-CR/NON-PD", "PD", "NE", "MISSING", "ND", NA_character_) aval_resp(response_values) # Returns: 1, 2, 3, 4, 5, 6, 7, NA, NA # Use in ADRS dataset creation library(dplyr) adrs <- adrs %>% mutate( AVALC = RSSTRESC, AVAL = aval_resp(AVALC) ) ``` -------------------------------- ### Derive Progressive Disease Parameter Source: https://context7.com/pharmaverse/admiralonco/llms.txt Identifies the date of first PD using extreme record derivation. ```r library(admiralonco) library(admiral) library(dplyr) # Derive Progressive Disease parameter adrs <- adrs %>% derive_extreme_records( dataset_ref = adsl, dataset_add = adrs, by_vars = get_admiral_option("subject_keys"), filter_add = PARAMCD == "OVR" & AVALC == "PD" & ANL01FL == "Y", order = exprs(ADT, RSSEQ), mode = "first", exist_flag = AVALC, false_value = "N", set_values_to = exprs( PARAMCD = "PD", PARAM = "Disease Progression by Investigator", PARCAT1 = "Tumor Response", PARCAT2 = "Investigator", PARCAT3 = "RECIST 1.1", AVAL = yn_to_numeric(AVALC), ANL01FL = "Y" ) ) ``` -------------------------------- ### Test derive_param_bor deprecation notice Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/derive_param_bor.md Demonstrates the deprecation warning issued when calling the function, advising migration to admiral::derive_extreme_event(). ```R actual_01 <- derive_param_bor(dataset = adrs, dataset_adsl = adsl, filter_source = PARAMCD == "OVR", source_pd = NULL, source_datasets = NULL, reference_date = TRTSDT, ref_start_window = 28, set_values_to = exprs(AVAL = {{ aval_fun_pass }}(AVALC), PARAMCD = "BOR", PARAM = "Best Overall Response")) ``` -------------------------------- ### Call deprecated derive_param_clinbenefit function Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/derive_param_clinbenefit.md Call the derive_param_clinbenefit function to trigger the deprecation message. This function is deprecated and users should use admiral::derive_extreme_event instead. The deprecation message will become a warning in 2027. ```r actual_output <- derive_param_clinbenefit(dataset = adrs, dataset_adsl = adsl, filter_source = PARAMCD == "OVR", source_resp = resp, source_pd = pd, source_datasets = list(adrs = adrs), reference_date = TRTSDT, ref_start_window = 28, clinben_vals = c("CR", "PR", "SD"), set_values_to = exprs( AVAL = yn_to_numeric(AVALC), PARAMCD = "CBR", ANL01FL = "Y")) ``` -------------------------------- ### Derive Confirmed Best Overall Response Source: https://context7.com/pharmaverse/admiralonco/llms.txt Placeholder for deriving the confirmed best overall response parameter. ```r library(admiralonco) library(admiral) library(dplyr) # Derive Confirmed Best Overall Response parameter ``` -------------------------------- ### Handle filter_pd deprecation Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/filter_pd.md Demonstrates the deprecation message triggered when calling filter_pd and date_source, which are deprecated as of admiralonco 1.4. ```R actual_output <- filter_pd(dataset = adrs, filter = PARAMCD == "OVR", source_pd = date_source(dataset_name = "adevent", date = ADT, filter = PARAMCD == "PD", ), source_datasets = list(adevent = adevent)) ``` -------------------------------- ### Test derive_param_bor missing records error Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/derive_param_bor.md Triggers an error when the filter_source argument results in zero records from the input dataset. ```R derive_param_bor(dataset = adrs, dataset_adsl = adsl, filter_source = PARAMCD == "MISSING RECORDS", source_pd = NULL, source_datasets = NULL, reference_date = TRTSDT, ref_start_window = 28, set_values_to = exprs(PARAMCD = "BOR", PARAM = "Best Overall Response")) ``` -------------------------------- ### Validate response values in derive_param_confirmed_bor Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/derive_param_confirmed_bor.md Demonstrates the error triggered when invalid response values are provided to the function. ```R derive_param_confirmed_bor(adrs, dataset_adsl = adsl, filter_source = PARAMCD == "OVR", source_pd = pd_date, source_datasets = list(adrs = adrs), reference_date = TRTSDT, ref_start_window = 28, ref_confirm = 28, set_values_to = exprs(PARAMCD = "CBOR", PARAM = "Best Confirmed Overall Response by Investigator")) ``` -------------------------------- ### Flag Assessments up to First PD Source: https://context7.com/pharmaverse/admiralonco/llms.txt Creates an analysis flag (ANL02FL) to restrict assessments to those occurring on or before the first PD date. ```r library(admiralonco) library(admiral) library(dplyr) # Flag assessments up to first PD (ANL02FL) adrs <- adrs %>% derive_var_relative_flag( by_vars = get_admiral_option("subject_keys"), order = exprs(ADT, RSSEQ), new_var = ANL02FL, condition = AVALC == "PD", mode = "first", selection = "before", inclusive = TRUE ) # Select source assessments for parameter derivations # Post-baseline overall response assessments up to and including first PD ovr <- filter(adrs, PARAMCD == "OVR" & ANL01FL == "Y" & ANL02FL == "Y") ``` -------------------------------- ### Create Custom Non-standard Events Source: https://context7.com/pharmaverse/admiralonco/llms.txt Defines custom event criteria for study-specific endpoints or adjusted response values. ```r library(admiralonco) library(admiral) library(dplyr) # Example: Add PD > 42 days after randomization as clinical benefit criterion cb_y_pd <- event( description = "Define PD occurring more than 42 days after randomization as clinical benefit", dataset_name = "ovr", condition = AVALC == "PD" & ADT > RANDDT + 42, set_values_to = exprs(AVALC = "Y") ) # Derive alternative confirmed clinical benefit adrs <- adrs %>% derive_extreme_event( by_vars = get_admiral_option("subject_keys"), order = exprs(desc(AVALC), ADT, event_nr), tmp_event_nr_var = event_nr, mode = "first", events = list(crsp_y_cr, crsp_y_pr, cb_y, cb_y_pd, no_data_n), source_datasets = list(ovr = ovr, adsl = adsl), set_values_to = exprs( PARAMCD = "ACCB", PARAM = "Alternative Confirmed Clinical Benefit by Investigator", PARCAT1 = "Tumor Response", AVAL = yn_to_numeric(AVALC), ANL01FL = "Y" ) ) # Example: Add non-standard response value (No Evidence of Disease) bor_ned <- event( description = "Define NED for best overall response occurring at least 42 days after randomization", dataset_name = "ovr", condition = AVALC == "NED" & ADT >= RANDDT + 42, set_values_to = exprs(AVALC = "NED") ) # Use custom event in BOR derivation adrs <- adrs %>% derive_extreme_event( by_vars = get_admiral_option("subject_keys"), order = exprs(event_nr, ADT), tmp_event_nr_var = event_nr, mode = "first", source_datasets = list(ovr = ovr, adsl = adsl), events = list(bor_cr, bor_pr, bor_sd, bor_non_crpd, bor_ned, bor_pd, bor_ne, no_data_missing), set_values_to = exprs( PARAMCD = "A1BOR", PARAM = "Best Overall Response (adjusted for NED at Baseline)", AVAL = aval_resp(AVALC), ANL01FL = "Y" ) ) ``` -------------------------------- ### Derive Response Parameter Source: https://context7.com/pharmaverse/admiralonco/llms.txt Uses derive_extreme_event to identify subjects with a CR or PR response based on the rsp_y event object. ```r library(admiralonco) library(admiral) library(dplyr) # Prepare overall response source dataset ovr <- filter(adrs, PARAMCD == "OVR" & ANL01FL == "Y" & ANL02FL == "Y") # Derive Response parameter (CR or PR = Y, otherwise N) adrs <- adrs %>% derive_extreme_event( by_vars = get_admiral_option("subject_keys"), order = exprs(event_nr, ADT), tmp_event_nr_var = event_nr, mode = "first", events = list(rsp_y, no_data_n), source_datasets = list(ovr = ovr, adsl = adsl), set_values_to = exprs( PARAMCD = "RSP", PARAM = "Response by Investigator (confirmation not required)", PARCAT1 = "Tumor Response", PARCAT2 = "Investigator", PARCAT3 = "RECIST 1.1", AVAL = yn_to_numeric(AVALC), ANL01FL = "Y" ) ) # Result: Each subject gets one RSP record with AVALC = "Y" or "N" ``` -------------------------------- ### Validate response values in derive_param_confirmed_resp Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/derive_param_confirmed_resp.md Triggers an error when invalid response values are provided to the function. ```R derive_param_confirmed_resp(adrs, dataset_adsl = adsl, filter_source = PARAMCD == "OVR", source_pd = pd_date, source_datasets = list(adrs = adrs), ref_confirm = 28, set_values_to = exprs(PARAMCD = "CRSP", PARAM = "Confirmed Response by Investigator")) ``` -------------------------------- ### Derive Best Confirmed Overall Response Source: https://context7.com/pharmaverse/admiralonco/llms.txt Derives the CBOR parameter using a specific hierarchy of events and extreme record selection. ```r adrs <- adrs %>% derive_extreme_event( by_vars = get_admiral_option("subject_keys"), order = exprs(event_nr, ADT), tmp_event_nr_var = event_nr, mode = "first", events = list(cbor_cr, cbor_pr, bor_sd, bor_non_crpd, bor_pd, bor_ne, no_data_missing), source_datasets = list(ovr = ovr, adsl = adsl), set_values_to = exprs( PARAMCD = "CBOR", PARAM = "Best Confirmed Overall Response by Investigator", PARCAT1 = "Tumor Response", PARCAT2 = "Investigator", PARCAT3 = "RECIST 1.1", AVAL = aval_resp(AVALC), ANL01FL = "Y" ) ) ``` ```r adrs <- adrs %>% derive_extreme_records( dataset_ref = adsl, dataset_add = adrs, by_vars = get_admiral_option("subject_keys"), filter_add = PARAMCD == "CBOR" & AVALC %in% c("CR", "PR"), exist_flag = AVALC, false_value = "N", set_values_to = exprs( PARAMCD = "CBCP", PARAM = "Best Confirmed Overall Response of CR/PR by Investigator", PARCAT1 = "Tumor Response", AVAL = yn_to_numeric(AVALC), ANL01FL = "Y" ) ) ``` -------------------------------- ### Derive Clinical Benefit Parameter Source: https://context7.com/pharmaverse/admiralonco/llms.txt Derives a clinical benefit parameter by combining response and stable disease events using rsp_y and cb_y. ```r library(admiralonco) library(admiral) library(dplyr) # Clinical benefit: response (CR/PR) OR SD/NON-CR/NON-PD at least 42 days after randomization adrs <- adrs %>% derive_extreme_event( by_vars = get_admiral_option("subject_keys"), order = exprs(desc(AVALC), ADT, event_nr), tmp_event_nr_var = event_nr, mode = "first", events = list(rsp_y, cb_y, no_data_n), source_datasets = list(ovr = ovr, adsl = adsl), set_values_to = exprs( PARAMCD = "CB", PARAM = "Clinical Benefit by Investigator (confirmation not required)", PARCAT1 = "Tumor Response", PARCAT2 = "Investigator", PARCAT3 = "RECIST 1.1", AVAL = yn_to_numeric(AVALC), ANL01FL = "Y" ) ) # ADT is set to earliest date of response or qualifying SD/NON-CR/NON-PD ``` -------------------------------- ### Validate source_datasets in filter_pd Source: https://github.com/pharmaverse/admiralonco/blob/main/tests/testthat/_snaps/filter_pd.md Triggers an error when the dataset name provided in source_pd is missing from the source_datasets list. ```R filter_pd(dataset = adrs, filter = PARAMCD == "OVR", source_pd = source_pd, source_datasets = list(ars = adrs)) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.