How can I correctly print a tree structure of an R expression with correct indentation levels?
I am trying to write a function in R called functionTree that takes an R expression and prints its structure in a tree format. The function should display the elements of the expression with their types and indent them according to their depth in the tree. I have the following requirements: