I have a rather large dataframe where variables are denominated in annual local currency (in the example below, Australian and Austrian currency):
Country Var _1995 _1996 _1997 _1998
AUS GO 1 014 828 1 059 326 1 119 101 1 194 995
AUS L 36 873 38 895 39 502 40 425
AUS K 41 498 45 008 48 683 47 252
AUT GO 289 923 299 487 309 734 323 273
AUT GO 8 032 7 849 8 049 7 815
AUT L 1 094 1 151 1 163 1 152
AUT K 12 032 11 760 11 743 11 611
I want to convert the values in this dataframe into 1995 dollars, using these multipliers:
Country _1995 _1996 _1997 _1998
AUS 0,7415 0,78295 0,74406 0,6294
AUT 1,36646 1,30031 1,12904 1,11319
So that for each row which contains the variable AUS in table 1, the value for each year is multiplied by the appropriate $1995 multiplier from the row containing AUS in table 2. The same should apply for each row containing AUT, as well as the 38 other country codes in my dataframe.
So, in the first line I would want R to perform this calculation:
Country Var _1995 _1996 _1997 _1998
AUS GO 1014828*0,7415 1059326*0,78295 1119101*0,74406 1194995*0,6294
And so on. Is this doable? Help much appreciated!