remove_patients: Remove patients from the cohort.

View source: R/remove_patients.R

remove_patientsR Documentation

Remove patients from the cohort.

Description

Each patient is identied through its id (patientID); with this function, you can remove patients, which consists in removing data and trees. If you have fit the models or clustered the cohort, you must re-run the analyses after this modification; for this reason, any previous result from those analyses is cancelled from the returned object.

Notice also that some drivers might be removed by this function.

Usage

remove_patients(x, patientID, check = TRUE)

Arguments

x

A REVOLVER cohort.

patientID

Id of the patient to remove. It can be a vector.

Value

A modified cohort without the required patients.

Examples

# Data released in the 'evoverse.datasets'
data('TRACERx_NEJM_2017_REVOLVER', package = 'evoverse.datasets')

print(TRACERx_NEJM_2017_REVOLVER)

new_cohort = remove_patients(TRACERx_NEJM_2017_REVOLVER, "CRUK0001")
print(new_cohort)

new_cohort = remove_patients(TRACERx_NEJM_2017_REVOLVER, c("CRUK0002", "CRUK00024"))
print(new_cohort)

caravagn/revolver documentation built on May 21, 2022, 5:48 p.m.