On 6/2/05, Stefan Mischke <[EMAIL PROTECTED]> wrote:
> Dear List
> 
> I have two large matrices A and B. Both have the same dimensions, let's
> say 20k x 30k. About half the cells of B are missing. Now I'm looking
> for an efficient way to merge them, so that the missing values in B are
> replaced by the corresponding values of A.

How about:
B[is.na(B)] <- A[is.na(B)]


Sarah

-- 
Sarah Goslee
http://www.stringpage.com

______________________________________________
[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

Reply via email to