I have a big vactor (3GB) to process thru lapply, and I would like to know how much it has proceeded. It is easier if I can identify which element it is, but what if I can't?
In the for
loop, I may assign a counter inside the loop, but how should I do to set a counter inside lapply
?
X <- LETTERS[1:26]
lapply(X, function(a) {
cat(paste0(which(X == a), "\r")
print(a)
})
Many thanks.