I am new to R and need help with the following task. In the table below is a dummy example of data. I am struggling with writing a script that should change the price, if only one price is different (for a particular ppcode, in this example is 4th) and only one symbol in that price differs compared with the majority, to the same number as other prices. In this example, 1.42 should be changed to 1.45. But also if instead of 1.42 would be, for example, 1.55 it also should be changed to 1.45, or when 2.45 to 1.45 (in all cases when only one digit of a price differs).
Thanks in advance for any suggestions.
