So I have a dataframe as follows:
ID A B C
1 .3 .3 .4
2 .1 .5 .4
3 .7 0 .3
And I have the following:
ID VALUE
1 10
1 5
1 100
2 30
3 34
2 12
I basically want to multiply my VALUE across my Df1 to produce those variables. So for each instance of the ID, the appropriate multipliers are used. Dplyr solution is needed here.
My final goal:
ID VALUE A B C
1 10 3 3 4
1 5 1.5 1.5 2
1 100 30 30 40
2 30 3 15 12
3 34 23.8 0 10.2
2 12 1.2 6 4.8
EDIT: The ID variable is a character