title: Datewise grouping data in R
body: <p>I have sample dataframe:</p>
  
  <pre><code>date            item1    item2    item3
  17-11-2016      2A        hp       cnf
  12-11-2016      1A        bp       wl
  13-11-2016      3A        sp       dl
  14-11-2016      1A        hp       cnf
  16-11-2016      2A        bp       cnf
  10-11-2016      1A        sp       wl
  17-11-2016      2A        hp       wl
  </code></pre>
  
  <p>I want to group data based on all columns date, item1 and item2, so that particular column with same value will come to same group. </p>
  
  <p>Expected output:</p>
  
  <pre><code>date            item1    item2    item3    grp
  17-11-2016      2A        hp       cnf      1
  17-11-2016      2A        hp       wl       1
  12-11-2016      1A        bp       wl       2
  13-11-2016      3A        sp       dl       3
  14-11-2016      1A        hp       cnf      4
  16-11-2016      2A        bp       cnf      5
  10-11-2016      1A        sp       wl       6
  </code></pre>