2
To follow the processing status in my routines I use the progress bars of the package pbapply
, but I couldn’t find a dynamic way to follow more than one process. To illustrate the problem I considered a list containing three elements of different dimensions and want to join them taking into account the common element between them (ID):
lista<-list(A=data.frame(ID=1:100, Med=rnorm(100,50,100)),
B=data.frame(ID=1:50, Med=rnorm(100,50,50)),
C=data.frame(ID=51:100, Med=rnorm(100,50,25)))
result<-data.frame(ID=1:100,matrix(NA,nrow = 100,ncol = length(lista)))
for(t in 1:length(lista)){
local<-dim(lista[[t]])[1]
for(t2 in 1:local){
posilocal<-which(result$ID==lista[[t]]$ID[t2])
result[posilocal,(t+1)]<-lista[[t]]$Med[t2]
}
}
How can I create a progress bar that shows the situation of the process, considering the evolution of t and t2?