Learn R Programming

rsurveycto (version 0.2.2)

drop_empties: Drop empty columns from a data.table

Description

An empty column is one whose only values are NA or "".

Usage

drop_empties(d)

Value

d modified by reference, invisibly.

Arguments

d

data.table.

Examples

Run this code
library('data.table')
d = data.table(w = 3:4, x = c('', 'foo'), y = c(NA, NA), z = c(NA, ''))
drop_empties(d)

Run the code above in your browser using DataLab