Как насчет:
## make up data
z <- matrix(c(1,0,0,-1,1,
1,0,0,0,1,
0,0,0,0,0,
0,0,1,0,0),
nrow=5,
dimnames=list(LETTERS[1:5],NULL))
condition <- c("0,0,0,0","0,0,0,1","0,0,1,0","0,1,0,0","1,0,0,0",
"0,0,1,1","1,1,0,0","0,1,1,0","1,0,0,1","1,0,1,0",
"0,1,0,1","1,0,1,1","1,1,0,1","1,1,1,0","0,1,1,1","1,1,1,1")
strtab <- apply(z,1,paste,collapse=",")
## rownames(z)[match(condition,strtab)] ## first match only
omat <- outer(condition,strtab,"==") ## all comparisons
colnames(omat)[col(omat)][omat] ## select corresponding colnames