title: crossprod of values with the same value in one column
body: <p>I have a dataframe that looks something like this (very simplified):</p>
  <pre><code>Fund     Weight        Value1       Value2
  A         0.3           83            100
  A         0.2           62            150   
  A         0.4           70            70  
  A         0.1           80            180  
  B         0.15          87            120 
  B         0.25          91            80   
  B         0.5           76            170  
  B         0.2           12            110
  </code></pre>
  <p>What I am trying to do is to calculate the cross-product between the columns Weight and other columns for each Fund.</p>
  <p>Eventually, I want to have a data frame that looks something like this:</p>
  <pre><code>Fund     Value1       Value2
  A          73.3         106
  B          76.2         145 
  </code></pre>
  <p>So far, I have only managed to calculate the cross-product with a separate data frame for each Fund which is not a viable option as the data frame is too big.</p>
  <p>Any help would be very appreciated.</p>