Hello List,

Is there a faster way to set values in one data.frame equal to NA conditional on the corresponding value in another data.frame? Currently I am using:
> b[is.na(a)] <- NA
where 'a' and 'b' are data.frames of equal size/dimensions, and 'a' contains NAs but 'b' does not. This is extremely slow as is, as my data.frames are about 6000 columns by 6000 rows in size.
Are there any tricks to speed things up here?

Thank you in advance,

Carson

______________________________________________
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