On Mon, 8 Mar 2004 18:18:28 -0600 (CST), you wrote: >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? x[is.nan(x)] <- 42 See ?NaN for related functions. Duncan Murdoch