Skip to content
Prev 156161 / 398506 Next

HI

That throws errors for me.  An alternative is 
vec[vec==0] <- NA

This also works for data frames, e.g.
df <- data.frame(a=c(1,2,3,0,3,4,0,5,2), b=c(1,0,0,1,1,0,1,1,0))
df[df==0] <- NA

Regards,
Richie.

Mathematical Sciences Unit
HSL


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}