Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- readJson <- function (file) {
- require(jsonlite)
- dat <- tryCatch(
- {
- fromJSON(file, flatten=TRUE)
- },
- error = function(cond) {
- message(cond)
- return(NA)
- },
- warning = function(cond) {
- message(cond)
- return(NULL)
- }
- )
- return(dat)
- }
- dat<- parLapply(cl,files,readJson)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement