For a set of `patients` - all by default - extract the clustering information computed by REVOVLER. The result is just a tibble with a column representing the patient id, and a column with the cluster label.
Cluster(x, patients = x$patients)
x | A REVOLVER cohort with fits and clusters. |
---|---|
patients | Patients to use, all by default. |
A tibble with the required clustering assignments
# Data released in the 'evoverse.datasets' data('TRACERx_NEJM_2017_REVOLVER', package = 'evoverse.datasets') Cluster(TRACERx_NEJM_2017_REVOLVER)#> # A tibble: 99 x 2 #> patientID cluster #> <chr> <chr> #> 1 CRUK0001 C2 #> 2 CRUK0002 C1 #> 3 CRUK0003 C2 #> 4 CRUK0004 C2 #> 5 CRUK0005 C3 #> 6 CRUK0006 C3 #> 7 CRUK0007 C2 #> 8 CRUK0008 C1 #> 9 CRUK0009 C3 #> 10 CRUK0010 C2 #> # … with 89 more rows#' Cluster(TRACERx_NEJM_2017_REVOLVER, patients = c("CRUK0001", "CRUK0002"))