combines study completion data, overall response data, and death data to output a dataframe containing pd date and death status.
Source:R/complete_death.R
complete_death.Rdcombines study completion data, overall response data, and death data to output a dataframe containing pd date and death status.
Usage
complete_death(
dfDeath,
dfStudyCompletion,
dfOverallResponse,
dfRandomization,
chrDeathDateCol = "death_dt",
chrStudyDiscontinuationReasonCol = "compreas",
chrDeathResponse = "Death",
chrResponseCol = "ovrlresp",
chrPDResponse = "PD",
chrResponseDateCol = "rs_dt",
chrRandomizationDateCol = "rgmn_dt"
)Arguments
- dfDeath
data.framedeath data frame with mapped names- dfStudyCompletion
data.framestudy completion data frame with mapped names- dfOverallResponse
data.frameoverall response data frame with mapped names- dfRandomization
data.framerandomization data frame with mapped names- chrDeathDateCol
charactername of column indfDeaththat contains the death date. Default:"death_dt".- chrStudyDiscontinuationReasonCol
charactername of column indfStudyCompletionthat contains the reason for study completion. Default:"compreas".- chrDeathResponse
charactervalue ofcompreasindfStudyCompletionthat indicates death. Default is "Death"- chrResponseCol
charactername of column indfOverallResponsethat contains the overall response. Default:"ovrlresp".- chrPDResponse
charactervalue ofovrlrespindfOverallResponsethat indicates PD. Default is "PD"- chrResponseDateCol
charactername of column indfOverallResponsethat contains the overall response date. Default:"rs_dt".- chrRandomizationDateCol
charactername of column indfRandomizationthat contains the randomization date. Default:"rgmn_dt".
Examples
if (FALSE) { # \dontrun{
lSource <- list(
Source_OverallResponse = gsm.endpoints::lSource_ep$Raw_OverallResponse, ## Overall response
Source_Death = gsm.endpoints::lSource_ep$Raw_Death, ## Death date
Source_STUDCOMP = gsm.endpoints::lSource_ep$Raw_STUDCOMP
)
lMapping <- gsm.core::MakeWorkflowList(
strPath = "workflow/1_mappings",
strNames = c("Death", "OverallResponse", "STUDCOMP"),
strPackage = "gsm.mapping"
)
combined_spec <- gsm.mapping::CombineSpecs(lMapping)
lRaw <- gsm.mapping::Ingest(lSourceData = lSource, lSpec = combined_spec)
complete_death(
dfDeath = lRaw$Raw_Death,
dfStudyCompletion = lRaw$Raw_STUDCOMP,
dfOverallResponse = lRaw$Raw_OverallResponse
)
} # }