[R] vector of NA indices

Peter B. Mandeville mandevip at uaslp.mx
Wed Jul 14 04:09:21 CEST 1999


I have a vector Pes with 600 elements some of which are NA's. How can I
form a vector of the indices of the NA's.

	for(i in 1:600) if(is.na(Pes[i])) print(i)

prints the indices of the NA's but I can't figure out how to put the
results in a vector.

Thank you very much.

Peter B.


--
Peter B. Mandeville                             mandevip at deimos.tc.uaslp.mx
Jefe del Depto. de Informática y Bioestadística rpe1531 at pasteur.fmed.uaslp.mx 
Facultad de Medicine                            Tel: 48 26-23-45 ext. 232
Universidad Autónoma de San Luis Potosí         Fax: 48 28-23-52
Av. V. Carranza 2405
Col. Los Filtros
Apartado Postal 145
San Luis Potosí, S.L.P.
78210 México

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list