Dataset attribute headings
I am a beginner and I am trying something like this:
for (i in newTrain) {
count = 0
count = length(which(is.na(newTrain$i)))
names(-which(count>100))
}
but this isn't working at all for me.
Dataset attribute headings
I am a beginner and I am trying something like this:
for (i in newTrain) {
count = 0
count = length(which(is.na(newTrain$i)))
names(-which(count>100))
}
but this isn't working at all for me.
We could first apply is.na for the entire dataframe and then sum the value of NAs for every column. Then select columns which have NA value less than 100.
newTrain[colSums(is.na(newTrain)) < 100]