You can use the function usethis::use_github to help you with that. it will use the github API to create a repo in github and push your local git repo there. You can use usethis::use_git to add your project with git.
The workflow of having an existing project and create the github repo last is explained in this chapter of happygitwithr book:
It is an awesome resource by @jennybryan about Git, Github, R and RStudio.
Know that currently there is a workshop at RStudio Conf that talked about it. Here is a great blog post that present some notes and mentioned this too: