i have the following dataframes:
df1
factory DC `tariff springtouw`
<chr> <chr> <dbl>
1 Poznan Bismarck 3000
2 Poznan Houston 3000
3 Poznan Memphis 2400
4 Poznan Albany 1000
5 Poznan Seattle 3500
df2
Som_Product pallets kosten
duikscooter 379312 37932
yoga 75651 226
springtouw 1162413 9687 #
stoel 1300512 3252
blender 1400148 2917
I want to multiply 3500 of df1 with 9687 of df2 and append the value in df2 on the spot of the #.
a code like this: df2$kosten[springtouw,] <- df1$tariff springtouw[5,3] * df2$pallets[3,2]
Possible output
output
df2
Som_Product pallets kosten
duikscooter 379312 37932
yoga 75651 226
springtouw 1162413 9687 33904500
stoel 1300512 3252
blender 1400148 2917