title: Create groups on base of the non-zero filled columns combination
body: <p>i am having a hard time to solve this problem. Im going to explain it the best on base of the example, lets have a look at the data below:</p>
  
  <pre><code>    order type_a type_b type_c type_d
  1     1      0     50     10      0
  2     2     10      0      0     80
  3     3     15      0      0     35
  4     4      0      0     30      0
  5     5      0     20     40      0
  </code></pre>
  
  <p>and <code>dput</code>:</p>
  
  <pre><code>data &lt;- structure(list(order = c(1, 2, 3, 4, 5), type_a = c(0, 10, 15, 
  0, 0), type_b = c(50, 0, 0, 0, 20), type_c = c(10, 0, 0, 30, 
  40), type_d = c(0, 80, 35, 0, 0)), .Names = c("order", "type_a", 
  "type_b", "type_c", "type_d"), row.names = c(NA, -5L), class = "data.frame")
  </code></pre>
  
  <p>We can see that the first column tells us the order number, the rest of the columns tell us what <em>belongs</em> to this order. Additionally if the type_* column is filled with 0, then it is not relevant.</p>
  
  <p>I would like to create a new column that defines groups based on "order description" --> type_* columns. For example for order 1 &amp; order 5, we have same type_* columns filled with no 0 values, therefore they belong to the same group, same is for order 2 &amp; 3, etc.</p>
  
  <p>My final result should look like this:</p>
  
  <pre><code>   order type_a type_b type_c type_d   group
  1     1      0     50     10      0 group_1
  2     2     10      0      0     80 group_2
  3     3     15     10      0     35 group_2
  4     4      0      0     30      0 group_3
  5     5      0     20     40      0 group_1
  </code></pre>
  
  <p>Just for your information, in my real data i do have more then 4 columns type_* --> there is about 10-15 of them!</p>
  
  <p>Thanks for help!</p>