An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110601/f76dd035/attachment.pl>
Missing completely at random
2 messages · Blaz Simcic, Steven Kennedy
This works, but there might be a better way:
misscols<-lapply(howmanyMiss, function(x) sample(1:n, x))
for (i in 1:nMiss){
for (j in misscols[[i]]){
X[idMiss[i],j]<-NA
}
}