RPubs SSL Error

Whoever has created a knitr project in RStudio and tried to publish it to RPubs must have faced an 'SSL Error' message. Apparently this is due to some proxy setting. This is the solution:

(1) Create a text file and enter the following line in it:

options(rpubs.upload.method = “internal”)

(2) Save the file in the same directory as your knitr project. The file name should be .Rprofile

Note that the name starts with a dot (.)

(3) Now change to the knitr project directory and compile your Rmd file.

(4) Open your browser and login to Rpubs with your user name and password. (This is optional, but some times it was found to be a necessary step).

(5) Back in R studio, press 'publish'. Good luck !

NOTE:

Windows does not allow you to create a file whose name starts with a dot. (Linux does not have this problem). If you have a Linux box or Android phone, it is easy to create this file and transfer it to Windows. Otherwise, R Studio comes to our rescue:

In R Studio console, type the following command:

file.edit(“.Rprofile”)

Now a fresh file window opens. It is a blank file with the name .Rprofile. In that window, type your magic line

options(rpubs.upload.method = “internal”) and save it.