Skip to content

Instantly share code, notes, and snippets.

@jameskyle
Created November 19, 2015 19:22
Show Gist options
  • Select an option

  • Save jameskyle/ecfc6473b4bc55c0f75f to your computer and use it in GitHub Desktop.

Select an option

Save jameskyle/ecfc6473b4bc55c0f75f to your computer and use it in GitHub Desktop.
parse.or.na <- function(d, func) {
wrapper <- function(x) {
tryCatch(func(x),
error=function(e) {
print(e)
NA
}
)}
lapply(data, wrapper)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment