drop_empties {rsurveycto} | R Documentation |
An empty column is one whose only values are NA
or "".
drop_empties(d)
d |
|
d
modified by reference, invisibly.
library('data.table')
d = data.table(w = 3:4, x = c('', 'foo'), y = c(NA, NA), z = c(NA, ''))
drop_empties(d)