No need to delve into the source code. You only need to read the documentation. ?predict.randomForest indicates that one of its arguments is called predict.all :
pred.all Should the predictions of all trees be kept?
Thus, setting for TRUE will contain a prediction for each case for each tree, which you can then use to calculate the standard error for each case.
I recently became aware of this article by Stefan Wager, Trevor Hasti, and Brad Efron, who more rigorously explore the idea of ββstandard prediction errors created by random forests (and other bag predictors).
joran source share