>
> x[is.na(z)] <- NA
>
> This might send you a nasty bug if x and z are different lengths
> though -- just a head's up.
Another option
x*!is.na(z)*z
Regards
Petr
>
> Michael
>
> On Wed, May 16, 2012 at 12:55 PM, Mintewab Bezabih
> wrote:
> > Dear R users,
> >
> > I was wondering how I ca
x[is.na(z)] <- NA
This might send you a nasty bug if x and z are different lengths
though -- just a head's up.
Michael
On Wed, May 16, 2012 at 12:55 PM, Mintewab Bezabih
wrote:
> Dear R users,
>
> I was wondering how I can replace the values of a vector with the values
> from in another vecto
2 matches
Mail list logo