[R] inequality with NA

2006-09-22 Thread Mag. Ferri Leberl
Dear everybody! take a-c(5,3,NA,6). if(a[1]!=NA){b-7} if(a[3]!=5){b-7} if(a[3]!=NA){b-7} if(a[3]==NA){b-7} will alltogeather return Fehler in if (a[1] != NA) { : Fehlender Wert, wo TRUE/FALSE nötig ist (or simularly). Somehow this is logical. But how else should I get out, whether a certain

Re: [R] inequality with NA

2006-09-22 Thread Uwe Ligges
Mag. Ferri Leberl wrote: Dear everybody! take a-c(5,3,NA,6). if(a[1]!=NA){b-7} if(a[3]!=5){b-7} if(a[3]!=NA){b-7} if(a[3]==NA){b-7} will alltogeather return Fehler in if (a[1] != NA) { : Fehlender Wert, wo TRUE/FALSE nötig ist (or simularly). Somehow this is logical. But how

Re: [R] inequality with NA

2006-09-22 Thread Marc Schwartz (via MN)
On Fri, 2006-09-22 at 20:16 +0200, Mag. Ferri Leberl wrote: Dear everybody! take a-c(5,3,NA,6). if(a[1]!=NA){b-7} if(a[3]!=5){b-7} if(a[3]!=NA){b-7} if(a[3]==NA){b-7} will alltogeather return Fehler in if (a[1] != NA) { : Fehlender Wert, wo TRUE/FALSE nötig ist (or simularly).