Added Comments

Added comments to the R functions