search for: test2_

Displaying 1 result from an estimated 1 matches for "test2_".

Did you mean: test2
2009 Jul 14
2
averaging two matrices whilst ignoring missing values
...erage these matrices, but the NAs are preventing me. I get a "non-numeric argument to binary operator" error. That's the first problem. test<-read.csv("test.csv",header=FALSE) test2<-read.csv("test2.csv",header=FALSE) test_ <- as.matrix(test,na.rm=T) test2_ <- as.matrix(test2,na.rm=T) testave<- (test_+test2_)/2 ?? So off the bat I'm doing something wrong. How would I replace the missing values in one matrix with the corresponding non-missing values in another? It's acceptable to me if I only have one value representing the ave...