[R] replacing values in a vector
Giles Innocent
G.Innocent at vet.gla.ac.uk
Fri Jul 27 12:15:20 CEST 2001
Note that the below does not work for Inf/-Inf (gives NaN)
Giles
Dr. G.T. Innocent
Comparative Epidemiology and Informatics Group,
Dept. of Veterinary Clinical Studies,
Glasgow University Vet. School.
Bearsden Road, Glasgow G61 1QH
Tel. 0141 339 8855 Ext. 0531.
Fax. 0141 330 5729
e-mail G.Innocent at vet.gla.ac.uk
> Actually, if you just want a vector as v
> with 0 except for the NA, the easiest is just:
>
> v*0
>
> which will let be the NA if present.
>
> Agus
>
>
> 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