cleanup of TR functions.R code related to #32
Merge pull request #115 from bbest/master

cleanup of TR functions.R code related to #32