View source: R/h_adsl_adlb_merge_using_worst_flag.R
| h_adsl_adlb_merge_using_worst_flag | R Documentation |
Helper function that merges ADSL and ADLB datasets so that missing lab test records are inserted in the
output dataset. Remember that na_level must match the needed pre-processing
done with df_explicit_na() to have the desired output.
h_adsl_adlb_merge_using_worst_flag(
adsl,
adlb,
worst_flag = c(WGRHIFL = "Y"),
by_visit = FALSE,
no_fillin_visits = c("SCREENING", "BASELINE")
)
adsl |
( |
adlb |
( |
worst_flag |
(named |
by_visit |
( |
no_fillin_visits |
(named |
In the result data missing records will be created for the following situations:
Patients who are present in adsl but have no lab data in adlb (both baseline and post-baseline).
Patients who do not have any post-baseline lab values.
Patients without any post-baseline values flagged as the worst.
df containing variables shared between adlb and adsl along with variables PARAM, PARAMCD,
ATOXGR, and BTOXGR relevant for analysis. Optionally, AVISIT are AVISITN are included when
by_visit = TRUE and no_fillin_visits = c("SCREENING", "BASELINE").
# `h_adsl_adlb_merge_using_worst_flag`
adlb_out <- h_adsl_adlb_merge_using_worst_flag(
tern_ex_adsl,
tern_ex_adlb,
worst_flag = c("WGRHIFL" = "Y")
)
# `h_adsl_adlb_merge_using_worst_flag` by visit example
adlb_out_by_visit <- h_adsl_adlb_merge_using_worst_flag(
tern_ex_adsl,
tern_ex_adlb,
worst_flag = c("WGRLOVFL" = "Y"),
by_visit = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.