Also try this:
X[X == 0] <- NA
or
X2 <- replace(X, X == 0, NA)
On Fri, Jun 12, 2009 at 5:54 AM, Chuck Cleland wrote:
> On 6/12/2009 4:55 AM, Christine Griffiths wrote:
>> Hello
>>
>> I have a dataset in which I would like to replace 0s with NAs. There is
>> a lot of information on how to repla
On Fri, 2009-06-12 at 09:55 +0100, Christine Griffiths wrote:
> Hello
>
> I have a dataset in which I would like to replace 0s with NAs. There is a
> lot of information on how to replace NAs with 0, but I have struggled to
> find anything with regards to doing the reverse. Any recommendations wo
On 6/12/2009 4:55 AM, Christine Griffiths wrote:
> Hello
>
> I have a dataset in which I would like to replace 0s with NAs. There is
> a lot of information on how to replace NAs with 0, but I have struggled
> to find anything with regards to doing the reverse. Any recommendations
> would be great.
Hello
I have a dataset in which I would like to replace 0s with NAs. There is a
lot of information on how to replace NAs with 0, but I have struggled to
find anything with regards to doing the reverse. Any recommendations would
be great.
Cheers
Christine
4 matches
Mail list logo