Skip to content

Instantly share code, notes, and snippets.

@ColinFay
Created January 6, 2018 08:35
Show Gist options
  • Save ColinFay/0c6542d8e9bb4d224d19d1affad97255 to your computer and use it in GitHub Desktop.
Save ColinFay/0c6542d8e9bb4d224d19d1affad97255 to your computer and use it in GitHub Desktop.
library(purrr)
pos_log <- possibly(log, otherwise = NA)
l <- list(1,2,3, "a", 4, "b")
map(l, pos_log) %>% discard(is.na)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment