This is a sample of my data. I have about 50 numeric variables such as turnover, sales, etc. Obs ID_number code units currency value Turnover Sales goods_sold 1 AE00006541 U1 units USD 50000 548741902 157000000 67000200 2 AE00037163 U2 units USD 12000 45000000 28359000 12000322 3 AE00037226 C1 thous USD 60 92322 12450 7200 4 AE00037282 U2 thous USD 6 73000 15720 9543 5 AE00043424 C2 milli USD 1 46 15 9 6 AE00098593 U2 billi USD 0.5 3 4 1 I want to convert all the observations into the same units (there is a variable units that takes the values "units", "thous", "milli", and "billi"). To do this, I need to take the observations with the units equal to "thous", "milli", and "billi" and divide all the numeric variables by 1000, 1000000, and 1000000000, respectively. How can I do this? What I would like to have in the end is: Obs ID_number code units currency value Turnover Sales goods_sold 1 AE00006541 U1 units USD 50000 548741902 157000000 67000200 2 AE00037163 U2 units USD 12000 45000000 28359000 12000322 3 AE00037226 C1 units USD 60000 92322000 12450000 7200000 4 AE00037282 U2 units USD 6000 73000000 15720000 9543000 5 AE00043424 C2 units USD 1000000 46000000 15000000 9000000 6 AE00098593 U2 units USD 500000000 3000000000 4000000000 1000000000
... View more