On Fri, May 21, 2010 at 11:27 AM, Mohan L <l.mohanphy@gmail.com> wrote:

>
> 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])
>

> data[,-(1:2)] * 1000/data[ ,2]

It will work as I expected. I have "0" in the "C" row. After the calculation
it gives  "NaN" zero place. But I need there zero instead of NaN.

There may be some solution for this.

Thanks & Rg
Mohan L

	[[alternative HTML version deleted]]

