Dear all,
I am processing a very long and complicated list using lapply through a custom
function and I would like to generate some sort of progress report. For
instance, print a dot on the screen every time 1000 item have been process. Or
even better, reporting the percent of the list that have been process every
10%. However, I can't seem to figure out a way to achieve that.
For instance, I have a list of 50,000 slots:
aList <- replicate(50000,list(rnorm(50)))
That need to be process through the following custom function:
myFnc <- function(x){
tTest <- t.test(x)
return(list(p.value=tTest$p.value,t.stat=tTest$stat))
}
Using an lapply statement, as in:
myResults <- lapply(aList, myFnc)
The goal would be to report on the progress of the lapply() function during
processing.
Any suggestion would be greatly appreciated.
Thanks
Marco
--
Marco Blanchette, Ph.D.
Assistant Investigator
Stowers Institute for Medical Research
1000 East 50th St.
Kansas City, MO 64110
Tel: 816-926-4071
Cell: 816-726-8419
Fax: 816-926-2018
______________________________________________
[email protected] 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.