Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. readJson <- function (file) {
  2. require(jsonlite)
  3. dat <- tryCatch(
  4. {
  5. fromJSON(file, flatten=TRUE)
  6. },
  7. error = function(cond) {
  8. message(cond)
  9. return(NA)
  10. },
  11. warning = function(cond) {
  12. message(cond)
  13. return(NULL)
  14. }
  15. )
  16. return(dat)
  17. }
  18.  
  19. dat<- parLapply(cl,files,readJson)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement