If you use R markdown files in RStudio and have a GitHub account, you are already ready to publish your papers/projects online. You can share the link to your target audience or use the website to showcase what you know.

When you have your content ready, putting them on the internet takes less than half an hour if you have only one paper, or about one hour if you use the same structure as this website (with minor revision). I assume that you know how to knit your R Markdown file to html and have the files on a repository on your GitHub account. Here is how.

Publish one paper

There are three ways to post an article online (so far that I know) using GitHub.

First Method - html viewer

The first method is to use the html viewer.

For example, I wrote a R Markdown file and knitted into a html file, which were then stored in my repository on GitHub (see graph - html file highlighted in yellow). image1 html viewer - single paper

When I click on it, it has the html format and is not readable. image1_2

To render it to the html file from a browser that you see on your local computer, you go to the address box on the top of your GitHub page to copy the link image1_3

and then paste it to the the html viewer image1_4. When you click on the Preview button next to the link. It is now live online and you can share the link to others. image1_5

If you find the link too long and complicated to remember, you can use the free web service Bitly to shorten it. Mine is changed to the concise bitly link: http://bit.ly/33lhsF1 from the lengthy URL: http://htmlpreview.github.io/?https://github.com/cathydatascience/showprojectsonline/blob/master/howtopublish.html

Second method - RPubs

Alternatively, you can use the RPubs which is integrated in your knitted html file from RStudio and is free. After knitting the R Markdown file, you will see the html file on your local computer browser. On the top right corner, click on the triangle next to the Publish button. image2

It is a two-step process. First step, you need to register a RPubs account or sign in if you already have one. You write the title of your document and give a short description (so that other may find your paper from search). You can see the example below (the highlight is my RPubs account name). image