Hi! I have a column to class my data in different categories like 'AB', 'KD', 'other'.
But in my column "Class", some rows were already classified before as 'classb' for example and I don't want the values to be replaced. I don't know how to do. I do my classification with
mutate(class = case_when(cond1 ~ "AB",...))
To illustrate I have this :
Id / result / difftime / class
12 / 2 / 12 /
45 / 1 / 24 / classb
33 / 1 / 12 /
and I want this :
Id / result / difftime / class
12 / 2 / 12 / KD
45 / 1 / 24 / classb
33 / 1 / 12 / AB
instead of this :
Id / result / difftime / class
12 / 2 / 12 / KD
45 / 1 / 24 / AB
33 / 1 / 12 / AB
I would like to specify that I try to add as a condition class == 'class2' ~ 'class2' to keep the same value but it doesn't worked.
I hope I was clear. Thank you for your time.