Suggestion: bring back the "Publish to Rpubs" option

I guess suggestions to bring back old options are not popular :slightly_smiling_face: but I think I can make a good case for this one. Until a couple versions back (I think), one could easily publish an RMarkdown document to RPubs just by going on the Source window and clicking on "Publish Document": it was one of the two options (the other being "Publish to RStudio Connect"). Now it's gone. One can still publish to Rstudio, but s/he has to knit the .Rmd file first, and then the options appears in the "Publish" button of the preview window. This risks having many people miss it, and incorrectly assume that the "Publish to Rpubs" options has gone.

On one hand, I understand the interest in publicizing RStudio Connect, which is a commercial solution and offers much more than simply publishing static HTML documents such as RPubs does. Most of all, it offers a secure publishing solution to share various kinds of artifacts among members of the same organization. For this reason, Rpubs and RStudio Connect, IMO, don't compete: one is aimed at free, public sharing of HTML documents with the world, the other allows secure sharing of much more diverse content with people inside a certain team/organization/community.

On the other hand, one of the reasons of the success of RStudio is its free Desktop version, which is adopted by a vast user base. And RPubs allows many of these users to easily publish documents and to find a lot of knowledge shared by other users in various organizations around the world. I don't have usage statistics for Rpubs, but I think it's extremely popular among users both for publishing and for learning about R & Data Science, by reading other people's reports.

I suggest that you bring back the "Publish to Rpubs" option in the "Publish" menu of the Source window, at least for the free version of RStudio (RStudio Desktop).

1 Like

Oh weird, I hadn't even noticed it was gone until you mentioned it. I like RPubs for sort of semi-secretly testing things out (among other things), so ¯\(°_o)/¯ if it's being intentionally phased out of what…

2 Likes

I hope not! After years working on IP-protected projects which I couldn't share on RPubs, I was finally going to give back to the community by publishing an analysis on NASA data...I think it's not going to be phased out, anyway: it's just getting less of the spotlight with respect to RStudio Connect. I perfectly understand this for the commercial versions, but I suggest to "bring it back" for the free version.

3 Likes

Yes, it was intentional. You can't really publish the Rmd itself to Rpubs -- you can only publish rendered HTML. So when you click Publish on an Rmd file, the file was knitted to HTML as a side effect... unless the HTML version of the file was up to date, in which case that version was published. This lead to a lot of confusion; for instance:

  • it's slow to render my Rmd; why is it rendering when I click Publish? how can I stop it from doing that?
  • why does my Rmd sometimes have to be rendered before publish, and sometimes not?
  • when I click Publish in the editor, why do I have to clarify whether I mean to publish the Rmd itself or the HTML output?

In RStudio 1.1 we tried to clear this up by making the Publish button more literal: now it publishes specifically what you clicked Publish on. That is, if you click Publish on an Rmd, you're publishing the Rmd code itself (to a service like RStudio Connect), and if you click Publish on a viewer or preview, you're publishing HTML output. Since you can't publish Rmd code to RPubs, there's no longer an RPubs option when you publish from the editor.

We definitely underestimated the number of people who used Publish on the editor toolbar to publish to RPubs; many people believed we'd taken RPubs out of the picture entirely. We're open to improving this in a future release of RStudio if we can find a way to do so that's less confusing than the prior configuration!

8 Likes

To follow up on the point that @jonathan made, what has been removed here is the ability to publish .Rmd to RPubs. If you still want to publish the content to RPubs, you just need to render to HTML and then the preview / pop-up window will have a "Publish" button. Clicking on that gives you the same old RPubs option to publish! Hope that helps!

5 Likes

Hi, Cole, thanks for the reply! From what @jonathan wrote, I think you never had the ability to publish an .Rmd file to RPubs (at least I've never done that). I know that you can still publish the rendered HTML to RPubs from the previewer, but maybe it could be useful to write a short tutorial or a note about that, because many other users were perplexed and thought RPubs had gone away entirely.

Hi, @jonathan, thanks for the detailed reply. I didn't know that the Publish button created so much confusion: for me it has always been obvious that I could only publish the rendered HTML file to RPubs (I mean, if you just navigate the site a bit, you will notice that all files are HTML, and there are no bare Markdown files). Thus, it seemed natural to me that RStudio would knit the .Rmd file before publication, whenever the HTML file wasn't up to date.

I actually find more confusing the actual setup, where I can't publish until I preview, but that's because of my acquired habit: surely it makes sense to have it in the previewer. However, if in the future you decide to allow users to preview directly in the system browser (which may be useful on Windows), then it would be an issue.

Concerning the number of people who used Publish on the editor toolbar to "Publish to Rpubs”, I guess if it was a physical button it would be worn out on the keyboard of most R users :grinning:

For what it regards possibly less confusing configurations: since the old configuration never seemed confusing to me, I don't think I can help much here. However, I can think of two options:

  • restore the old config, but when the HTML file is not up to date, bring up an error box which says "please knit your file before publishing HTML to RPubs. If you wanted to publish the .Rmd file, please select another publishing service". To me it seems worse than the old behavior (it would only slow down my workflow). However, if so many people were confused at what the Publish button was actually doing, this could help.
  • keep the current config, which makes sense: after all, you can only publish HTML, and you wouldn't want to publish HTML which is not up to date, so it makes sense to be able to publish only after knitting. However, publicize the change more broadly, with a tutorial, a News page or something else (a video seems overkill for such a small change).

Cole, Jonathan,
Thank you for clarifications. Few follow-up questions:

  1. Publish functionality uses RCurl.
    Capture
    Is there a way to switch the backend to curl or the system-wide curl installation? I am using RStudio in corporate setting and need WinSSL support, which rOpenSci curl package has implemented

  2. How do I set up Rpubs account (as in credentials)? The respective menu in Tools > Global Options > Publishing > Connect is missing Rpubs account setup.

1 Like

On #1, I think @jonathan or someone else will have more to offer on what is possible. I am not 100% certain that you will have the flexibility (out of the box) to replace the RCurl commands with something from curl.

On #2, it looks like Rpubs will take care of authentication if you just go ahead and begin the publishing process. It redirects you to the following for login:

Rpubs uses a different publishing mechanism than RStudio Connect does. In a corporate setting, usually RStudio Connect is preferable, since Rpubs puts the document into the public.

Just found a potential option you could explore?

Try setting:

options("rsconnect.http" = 'curl')

Perhaps that will change the way rsconnect makes HTTP requests. The docs are here:

A post was split to a new topic: what are the criteria for an HTML file to be publishable to RPubs?

What I did is to install the Knitr package again. This brings back the Rpubs options.

I am using RStudio Version 1.2.1139.

Hope this helps.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.