Do so by navigating to Repositories > New. Give your repo an informative name and a description, if you’d like. Initializing it with a README and a .gitignore is recommended.
Click on the green ‘Code’ button and copy the URL to your clipboard.
In RStudio, click on Project (top right hand corner) > New Project.
HTML.## R Markdown at line 12 to Note that... at line 30)….Rmd file. IMPORTANT: Be sure to name your file as index.Rmd and save to your root directory.
Clicking the knit button will automatically save your .Rmd file. If you have not yet saved your file before clicking knit for the first time, it will open up the window to name and save your file before proceeding.
.html file will be saved to your root directory alongside the original .Rmd. You are able to send this .html file to others for viewing, but hang tight…GitHub Pages will make it even easier to share your work and ensure that your collaborators have the most up-to-date version.
NOTE: This knitted document is only stored as an .html file on your local computer at this point.
index.Rmd and index.html to GitHub.If you are unfamiliar or confused by the process of getting files from your computer to GitHub, check out this fun comic by Erika Heidi.
Git tab.
NOTE: Since I didn’t initially push my gh_pages_example.Rproj, I’ll do that now as well.
index.html file into a web page.We’re almost there! First head back to your GitHub repository and click the Settings tab, then select the Pages option from the menu on the left-hand side of the page.
main branch from the dropdown./(root) (if not already set).