rm.empty.cols removes columns that have only NAs AND whose names
start with a capital 'X' (unless na.only is TRUE in which case all NA columns
will be removed).
rm.empty.cols(x, na.only = FALSE)A data frame.
(data.frame). A data frame resulting from an imported Excel sheet by means of read.xls
(logical). Should all 'NA' columns be removed and not only those with a column name starting
with X as generated by Excel (see details section)?
Empty columns in Excel sheets are imported to NA columns in the resulting data frame.
If using gdata::read.xls for reading Excel files, columns that did not have a column name in the
spread sheet will result in data frame column names starting with 'X'. rm.empty.cols makes use
of these two criteria to identify columns that can safely be removed from the data frame.