[R] replacing values in a vector

Agustin Lobo alobo at ija.csic.es
Thu Jul 26 20:25:21 CEST 2001

Actually, if you just want a vector as v
with 0 except for the NA, the easiest is just:


which will let be the NA if present.


Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es

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