Dear All, I have data some thing like this:
> sample State Jan Feb Mar A 1 1 1 B 1298 1293 1294 C 0 0 0 D 5 5 5 E 18 18 18 I need to multiply "Jan" column *1000 and divided by the same number, like this : > data[,-(1:2)] * ((data[,2] *1000)/data[ ,2]) I doing some thing wrong with the above to get below result. What I actually need is : State Jan Feb Mar A 1*1000/1 1*1000/1 1*1000/1 B 1298*1000/1298 1293*1000/1298 1294 C 0 0 0 D 5 5 5 E 18 18 18 Here "Jan" base for me . Any help will be greatly appreciated. Thanks & Rg Mohan L [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.