Corrected as.tree to fix dimensions error, changed gTree$"" to gTree[,""]