committing R Script to the GitHub repository returns "Aborting commit due to empty commit message."

You need to write a commit message when you commit changes, regardless of how you make a commit (e.g. from the command line, in a git GUI, via the RStudio IDE, etc.). It must have a message. See this quick guide to git basics:
https://rogerdudler.github.io/git-guide/