From: Stefan Mischke <mischke_at_sozpsy.unizh.ch>

Date: Fri 03 Jun 2005 - 06:19:40 EST

Does R provide any functions for this?

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 03 06:26:48 2005

Date: Fri 03 Jun 2005 - 06:19:40 EST

Matrix A

[,1] [,2] [,3]

[1,] 1 2 3

[2,] 4 5 6

merged with Matrix B [,1] [,2] [,3]

[1,] 10 NA NA

[2,] NA 50 60

equals

[,1] [,2] [,3]checking for NAs and then replacing them with the corresponding values. But this is way too slow for my application. There must be a more efficient way.

[1,] 10 2 3

[2,] 4 50 60

One way to do this, is of course looping through all the cells,

Does R provide any functions for this?

Cheers

Stefan

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 03 06:26:48 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:32:22 EST
*