My table is like this:
  ID   feature v1    v2   v3
  1     mpg    
  1     ap     0.8
  1     cs     0.7   0.8
  1     de     0.2   0.6  1.2
  2     A
  2     B      0.5
  2     C      0.3   0.4  
1. The logic is column Permutations, for example: 0.8= mpg+ap, 0.7=mpg+cs, 0.2=mpg+de, 0.6=ap+de, 0.5=A+B
2. ID is differentiate the two group of permutations (first group is mpg, ap,cs,de. second group is A,B,C)
I want to convert to another data frame format which is like this:
ID  Feature1 Feature2 value
 1     mpg      ap     0.8
 1     mpg      cs     0.7
 1     mpg      de     0.2
 1     ap       cs     0.6
 1     ap       de     0.8
 1     cs       de     1.2
 2     A        B      0.5
 2     A        C      0.3
 2     B        C      0.4
Anyone has the suggestion of how to convert this structure (R>3.6.0)?
 
     
    