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 vector-component has an existing value?
Thank you in advance!
Yours,
Mag. Ferri Leberl

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to