[R] an issue about removing "NA"s from an array

Yasin Gocgun
2013-06-21T15:59:15Z

Hi,*

*I would like to set the entries of an array that appear as "NA" to a
certain integer, but did not find a way to do so. The related code is given
below:

A <- array(-1000 , dim=c(100) );

for(i in 1: 100 ){
     A[i] =B[i,57] -  B[i,5];
}

A [ which( A == "NA") ] <- 900;

The "NA"s still appear as the entries of the array A.

Can you tell me what is missing here? (I also tried setting the entries of
A to character using "as.character" but it did not work)

Thanks,


--
Yasin Gocgun

	[[alternative HTML version deleted]]