I have a list (temp.data) with many raster data and some computations are in parallel. n is the number of raster data and target is the mask. I'd like to use a progress bar. It is created but while the loop is running the progress is not showed. The loop ends and the progress bar is closed. I've tried to use the functions pdCreate/pdStep in raster package, but without success...
Someone have any idea... mypb <- tkProgressBar(title = "R progress bar", label = "", min = 0, max = n, initial = 0, width = 300) #creating a computing cluster cl <- makeCluster(detectCores(),type='SOCK') registerDoParallel(cl, cores = detectCores()) foreach(i=1:n,.packages=c('tcltk','rgdal','raster')) %dopar% { Sys.sleep(.1) setTkProgressBar(mypb, i, title = "R progress bar", label = NULL) temp.data[[i]]<-mask(temp.data[[i]],target,maskvalue=as.numeric(class.outsid e)) writeRaster(temp.data[[i]],filename=files.list[i],format='GTiff',overwrite=T ) } stopCluster(cl) close(mypb) Thanks Alexsandro ____________________________________________________________________________ _______ --- Este email est� limpo de v�rus e malwares porque a prote��o do avast! Antiv�rus est� ativa. http://www.avast.com [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.