R/details_parse_directory.R

Defines functions parse_directory

parse_directory<-function(DIR=choose.dir()){
  require(parallel);
  FLS <-list.files(path=DIR,recursive=T,full.names=T,pattern="details.xml$")
  size.of.list <- length(FLS);
  cl <- makeCluster( min(size.of.list, detectCores()) );
  work<-parallel::parLapply(cl=cl,FLS,parse)
 # Out<-do.call('rbind',work[!grepl("FAILURE",work)])
  Out<-dplyr::bind_rows(work[!grepl("FAILURE",work)])
  stopCluster(cl);
  as.data.frame(Out)
}
JARS3N/details documentation built on April 26, 2020, 9:16 p.m.