Re: [R] Exchange NAs for mean

2009-12-17 Thread Paul Hiemstra
Barry Rowlingson wrote: 2009/12/17 Joel Fürstenberg-Hägg : Hi all, I'm have a matrix (X) with observations as rows and parameters as columns. I'm trying to exchange all missing values in a column by the column mean using the code below, but so far, nothing happens with the NAs... Can any

Re: [R] Exchange NAs for mean

2009-12-17 Thread Chuck Cleland
On 12/17/2009 9:31 AM, Joel Fürstenberg-Hägg wrote: > Hi all, > > > > I'm have a matrix (X) with observations as rows and parameters as columns. > I'm trying to exchange all missing values in a column by the column mean > using the code below, but so far, nothing happens with the NAs... Can a

Re: [R] Exchange NAs for mean

2009-12-17 Thread Barry Rowlingson
2009/12/17 Joel Fürstenberg-Hägg : > > Hi all, > > > > I'm have a matrix (X) with observations as rows and parameters as columns. > I'm trying to exchange all missing values in a column by the column mean > using the code below, but so far, nothing happens with the NAs... Can anyone > see where

[R] Exchange NAs for mean

2009-12-17 Thread Joel Fürstenberg-Hägg
Hi all, I'm have a matrix (X) with observations as rows and parameters as columns. I'm trying to exchange all missing values in a column by the column mean using the code below, but so far, nothing happens with the NAs... Can anyone see where the problem is? N<-nrow(X) # Calculate numbe