l <- list(A=list(a=0:2, b=3:4, c=023-22030),
B=list(a=5:7, b=8:9))
subtree(l, 1:2, "b")
subtree(l, TRUE, mean, "a")
subtree(l, TRUE, exp, "c", error=browser)
subtree(l, TRUE, exp, "c", error=NA)
Run the code above in your browser using DataLab