Taking this dummy data for example
structure(list(Metastasis_Brain = c("1", "1", "0", "1", "0",
"0"), Metastasis_Liver = c("0", "0", "1", "1", "1", "0"), Metastasis_Bone = c("1",
"1", "0", "1", "1", "0")), class = "data.frame", row.names = c("Patient_1",
"Patient_2", "Patient_3", "Patient_4", "Patient_5", "Patient_6"
))
Example of what I'm searching for: If there is 1 in columns Metastasis_Brain and Metastasis_Liver, the new column will contain "Brain, Liver".
If all three tissues are 1, then that row in the new column will contain "Brain, Liver, Bone".
If all are 0, then it doesn't matter, NA would be fine.