Fixed function documentation

Small edits to functions.R to fix function documentation.