I have the dataframe assets_year:
fiscalyear countryname Assets net_margin
<int> <chr> <dbl> <dbl>
1 2010 Austria 1602544072. 1.72
2 2010 Belgium 2534519957. 0.974
3 2010 Estonia 33248259. 1.31
4 2010 Finland 1490200498. 1.42
5 2010 France 17137601040. 1.51
6 2010 Germany 11553780086. 2.32
tail
fiscalyear countryname Assets net_margin
<int> <chr> <dbl> <dbl>
1 2017 Luxembourg 503785373. 0.730
2 2017 Netherlands 3810079489. 1.40
3 2017 Portugal 504072448. 1.73
4 2017 Slovakia 61735274. 2.49
5 2017 Slovenia 41642423. 1.96
6 2017 Spain 4397884239. 1.39
Additionally, I summed up the asset values per year in another DF:
fiscalyear `sum(Assets)`
<int> <dbl>
1 2010 52192928317.
2 2011 55914561036.
3 2012 52202110772.
4 2013 42418952433.
5 2014 53001352848.
6 2015 43550880007.
In order to scale net margin per asset value, I would like to cbind(...) the sum(assets) to my preexisting dataframe which is in panel format. Thus all countries have a entry for 2010, 2011 ... 2017.