Create indicator var's for missing instances and zero out or impute values for NA instances in original data:
# create data
x <- c(1:12)
dim(x) <- c(3,4)
x[2,2] <- NA
x[3,3] <- NA
x
# create data frame for indicator var's
newframe <- 1*(is.na(x))
newframe
class(newframe)
# zero out NAs in data, or alternatively replaced with imputed values
x[is.na(x)] <- 0
# create data frame for original data and indicator var's
newdata <- cbind(x, newframe)
newdata
Copy and run.