title: Extracting class distribution at each final node of trees in random forest in R
body: <p>I'm using randomForest package in R. From what I've understood,this package only gives me the assigned class to each instance at the final nodes of each tree, but I need to know the class distribution at each node.</p>
  
  <p>Let's say at a final node of one tree we have 10 instances of class 0, and 20 instances of class 1 when the whole forest is trained. Now instead of saying the assigned class for this node is 1 (because of majority of instances from class 1) I want to know the class counts (10 and 20). is there any way to do so? Thanks for your help in advance.</p>