Skip to content
Prev 302425 / 398506 Next

deleting columns from a dataframe where NA is more than 15 percent of the column length

I have a dataframe of 10 different columns (length of each column is
the same). I want to eliminate any column that has 'NA' greater than
15% of the column length. Do i first need to make a function for
calculating the percentage of NA for each column and then make another
dataframe where i apply the function? Whats the best way to do this.