I have dataset1 with some missing values in each of the columns and dataset2 (same dimensions) but has the missing values imputed.
I want to subset the imputed values from dataset2 that were NA in dataset1. I don't have an NA flag in my original data.
I am using R Studio:
#Example
data.org <- as.data.frame( cbind(WT=c(NA,20,55,NA,25), HT= c(55,NA,NA,25,30), CBC=c(NA,10,20,NA,50) ) )
data.imp <- as.data.frame( cbind(WT=c(10,20,55,25,25), HT= c(55,30,55,25,30), CBC=c(15,10,20,40,50) ) )
#output
data.imp.WT <- as.data.frame(cbind(WT=c(10,25)))
data.imp.HT <- as.data.frame(cbind(HT=c(30,55)))
data.imp.CBC <- as.data.frame(cbind(CBC=c(15,40)))