Skip to content

Instantly share code, notes, and snippets.

@grayskripko
Created July 20, 2017 11:31
Show Gist options
  • Save grayskripko/5901bacdd6876099f75bb332cb06020d to your computer and use it in GitHub Desktop.
Save grayskripko/5901bacdd6876099f75bb332cb06020d to your computer and use it in GitHub Desktop.
Trim a list with NULLs
list(a=1, b=if (F) 2) %>% Filter(function(x) !is.null(x), .)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment