I have a dataset in R that is structured like so:
> head(top10_master, n = 5)
sensitivity PRODUCT NewRevenue NewQuantity NewProfit Change_Price Rev_Change Prof_Change Quant_Change Revenue Quantity Profit
1: 1 PRODUCT33411 7067750 11809634 5790148 0.80000 1.2282115 1.173265 1.5591315 5754505 7574495 4935074
2: 1 PRODUCT35481 4484178 5721789 3278738 1.04978 1.0000000 1.000000 1.0000000 4484178 5721789 3278738
3: 1 PRODUCT26835 5239519 2239783 3950871 0.90000 1.1801825 1.125136 1.3884444 4439584 1613160 3511460
4: 1 PRODUCT33203 5872765 1139270 3125781 0.90000 1.3477930 1.161484 1.6487265 4357320 691000 2691195
5: 1 PRODUCT22426 4125707 1121494 3249458 0.80000 0.9590297 1.378040 0.4507613 4301960 2488000 2358029
I am trying to edit the Change_Price
column to 1 (inside of a function) in the instances where the Rev_Change and Quant_Change columns == 1
. I have tried every method I could find including using dplyr
but for some reason none of these methods are working and the output is always the same. Please help.
I have tried too many methods to list them all but among them are all of the methods listed in this post. For some reason, none of these methods is working.