Thanks a lot! Both versions seem to work equally efficient. N8, Stefan > replace <- is.na(B) > B[replace] <- A[replace] > > Duncan Murdoch > B[is.na(B)] <- A[is.na(B)] > > Sarah