library("data.table")
dt <- data.table(
"SAMPLE_ID" = c("sample_1", "sample_2", "sample_3"),
"treatment" = c("healthy", "tumor", NA)
)
colors <- colormap(data = dt,
col_name = "treatment")
Run the code above in your browser using DataLab