Added R script containing some basic tree querying functions.