title: Sum data by year and use it as denominator to selected row
body: <p>I have this data.frame:</p>
  
  <pre><code>       Country_ID    Partner_ID     Export_Value
  
  1995   CZE           CHN            50
  1996   CZE           CHN            60
  1997   CZE           CHN            90
  1998   CZE           CHN            100
  1995   CZE           DEU            50
  1996   CZE           DEU            160
  1997   CZE           DEU            500
  1998   CZE           DEU            400
  </code></pre>
  
  <p>Now <strong>this is not entire data.frame</strong>, Years go from 1995-2016 and Partner_ID consists of 196 countries. Thus I showed only a picture how it looks like.</p>
  
  <p>What I am trying to achieve is to sum Export_Value for all possible Partner_ID in given year. In data above it would be 1995 = 100, 1995 = 220 etc.</p>
  
  <p>Afterward, I would use the numbers as dominator to get <strong>Export_Value_%</strong> column next to Export_Value.</p>
  
  <pre><code>      Country_ID    Partner_ID     Export_Value   Export_Value_%
  
  1995   CZE           CHN            50            0.5 (50%)            
  1996   CZE           CHN            60            0.27
  1997   CZE           CHN            90            0.15
  1998   CZE           CHN            100           0.2
  1995   CZE           DEU            50            0.5
  1996   CZE           DEU            160           0.73
  1997   CZE           DEU            500           0.85
  1998   CZE           DEU            400           0.8
  </code></pre>
  
  <p>Other possible what I was thinking about was to create new column populated with results of summing overall year value with all partners. However, that would not have the same length as other columns in the data frame (With annual export I could do the math in excel and I would have the results for future work.)</p>