I need to convert the entire data frame that consists of only "0/1", "1/1", and "0/0" to categorical values. I would like it to assign numbers like this 0 to "0/0" 1 to "1/1" and 2 to "0/1"
The Data frame looks something like this, but much bigger:
I would like this to be done using apply Result should look like this:
Here is the sample data frame
df <- data.frame(replicate(10,sample(c("0/1", "1/1", "0/0"), 20,rep=TRUE)))

