On Mon, Jul 13, 2009 at 11:31 AM, Tom Liptrot <tomlipt...@hotmail.com> wrote:

> I wish to combine these two into one matrix using the values from x where x 
> has values, and values from a where x has NA's, giving a new matrix which 
> would look like this:

This should do the trick:

x[which(is.na(x))]=a[which(is.na(x))]

--
Michael Knudsen
micknud...@gmail.com
http://www.google.com/profiles/micknudsen

______________________________________________
R-help@r-project.org 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