'How can I make a list from a DataFrame with the NA in R?

I have a data frame with n = 3575 sample units and K = 1007 variables of various types. I need to count the number of NA for each variable (columns) and each sample unit (rows). List the names of the top-10 variables with the largest number of NA records.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source