Suppose in one data frame I have, (they are strings)
data1<-data.frame(c("number1","number2"),c("dog,cat","pigeon,leopard"))
and in another data frame I have
 data2<-data.frame(c("pigeon","leopard","dog","cat"),
                   c("5 6 7 8","10 11 12 13","1 2 3 4","5 6 7 8"))
data2:
pigeon      5  6  7  8
leopard    10  11 12 13
dog         1  2   3  4
cat        5   6  7  8
My expected output is a 3-d matrix which would give me:
i=number1/number2
j=the strings corresponding to i
k=the values from the 2nd data frame.
That is I will have, if i select number1,
dog   1 2 3 4 
cat   5 6 7 8 
 
     
    