[R] how to replace NaN in a vector

Yong Wang wang at galton.uchicago.edu
Tue Mar 9 01:18:28 CET 2004


Hi, all

a vector such as

(1,2,4,-1,NaN,2,4,NaN)

if try to replace all the NaN with a numerical value, what's the easiest 
way?
thanks a lot



best
yong




More information about the R-help mailing list