Extract subtrees from R.

Basic at the moment.  Mostly rough edges, really.