title: Add frequency into dataframe for each group and unique element (R)
body: <p>I have a table such as</p>
  <pre><code>Group Family Nb 
  1     A      15
  2     B      20
  3     A      2
  3     B      1
  3     C      1
  4     D      10
  4     A      5
  5     B      1
  5     D      1
  </code></pre>
  <p>And I would like to transform that dataframe such that I have each unique <code>Family</code> element in columns, and for each <code>Group</code>, the frequency of the <code>Nb</code> element, I should then get :</p>
  <pre><code> Group  A    B    C    D    E  F
   1      1    0    0    0    0  0
   2      0    1    0    0    0  0
   3      0.5  0.25 0.25 0    0  0
   4      0.33 0    0    0.67 0  0
   5      0    0.5  0    0.5  0  0
  </code></pre>
  <p>Here is the dput format of the tabel if it can helps :</p>
  <pre><code>Family = c(&quot;A&quot;, &quot;B&quot;, &quot;A&quot;, &quot;B&quot;, &quot;C&quot;, &quot;D&quot;, &quot;A&quot;, &quot;B&quot;, &quot;D&quot;), 
      Nb = c(15L, 20L, 2L, 1L, 1L, 10L, 5L, 1L, 1L)), class = &quot;data.frame&quot;, row.names = c(NA, 
  -9L))
  </code></pre>