na.replace function

Replace the missing entries in a matrix columnwise with the entries in a supplied vector