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]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to