I have a data frame as:
pred
V1 V2 V3
2 0 1 0
4 0 0 1
5 0 0 1
8 0 0 1
11 0 1 0
16 0 1 0
20 1 0 0
21 0 1 0
24 0 1 0
26 0 1 0
31 0 0 1
32 1 0 0
34 1 0 0
I want to create a 4th column that is equal to "Intermediate" if V1 is equal to 1, is labeled as "Long" if V2 is equal to 1, and "Short" if V3 is equal to 1.
Thank you