Skip to content

Instantly share code, notes, and snippets.

@bfatemi
Created April 29, 2016 00:44
Show Gist options
  • Save bfatemi/1ce9a6df05060ac8430437d2471e2e83 to your computer and use it in GitHub Desktop.
Save bfatemi/1ce9a6df05060ac8430437d2471e2e83 to your computer and use it in GitHub Desktop.
One line to keep rows such that there are no NAs across all columns
# One line to keep rows such that there are no NAs across all columns
dt[Reduce("&", lapply(dt, function(i) !is.na(i)))]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment