RStudio in MyBinder

Hello! For the class I am TAing we have been using RStudio in MyBinder for all our computational labs. When I went to open the lab today the “RStudio” button on the launch page is gone. We checked chrome, safari, and firefox and all are missing the Rstudio button. Does anyone know what is going on or how to launch an RStudio session now? Thank you!

Fortunately, to bypass not seeing the buttons you should just need the URL to which those buttons link. There’s nothing special about those buttons; they are just clickable links. You can accomplish the same thing by pasting the URL for the page they link to in your browser’s address bar and hitting return.

I can use the current example to show you what you are looking for. Go to the r-conda binder example page and hover over the launch badge there next to RStudio:. You’ll see indicated something like below in your browser (in Chrome it shows up in the lower left side):

http://mybinder.org/v2/gh/binder-examples/r-conda/master?urlpath=rstudio

Note at the end ?urlpath=rstudio. That signals to launch into RStudio when the session comes up. The URL before that part just points the MyBinder system at the specific GitHub repo. Following that pattern you can design such URLs in your text editor, although in your present case I imagine that in the code of your site you already have it and could pluck it from the source. If you get the URL from there, put it in your text editor. However, you source the URL, you should get to the point of having it sitting in your text editor. Then from your text editor you then just paste it in to your browser’s address bar and hit return to trigger the launch.

If you need an example of what I mean for getting it from the text of the site, if you go the r-conda binder example page readme file and click the ‘Raw’ button, you’ll see the markdown for that part of the page is the following:

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/betatim/r-conda/master?urlpath=rstudio)

You’ll see the URL I had used above is in there among information about the site where the badge image is coming from and markdown syntax signaling the image.
Alternatively, if I had been at the r-conda page in Chrome and right-clicked and selected View Page Source, I could then search in the HTML for mybinder to locate the same code, this time in HTML form.
Your badge and URL info code could be differently if your site is based on restructured text or even HTML; however, the overall idea is similar. You should see a URL if you dig around.



As for sorting out why that happened suddenly, if it is still happening, could you link to an example? Or share the section of the markdown, restructured text, or HTML code on page where a badge should be?

If you were using custom badges from the custom badge generating site, it may just mean the current source at shields.io isn’t reachable. That’s just a guess on a possible cause based on the limited information you’ve provided.

1 Like

Hello, thank you so much for your response and help!! I changed the url to include ?urlpath=rstudio and now the binder launches directly to Rstudio.

Here is what the launch page looks like before I changed the url, there used to a button in the notebook section right next to Python 3 and R that said Rstudio and overnight the button is no longer there.

Sorry. I was thinking of session the launch page and didn’t think of the launcher pane.

Ideally, the students can use a launch badge like I outlined in my original reply to skip right to launching into RStudio. Especially until you sort out this issue.

That’s interesting that your Rstudio tile is gone from the launcher pane. I have one recently that still has the RStudio tile on the launch page in sessions launched via here in JupyterLab (version 3.2.8); however, I haven’t triggered a build in the last 24 hours.
By contrast, I do see there’s no RStudio tile on the launch page in Jupyterlab (version 3.1.11) sessions launched from the r-conda example to lab; however, I don’t recall if it was there before. (I tried this repo at a couple at both the Turing and Google domain of the Federation and that didn’t make a difference.)
Also don’t see the tile when launching into JupyterLab from an older R-based repo I set up; the version of JupyterLab is 3.1.11 as well. Same for this older R-based repo launching into JupyterLab.
You don’t say if a build was triggered in yours? Just that the tile on the launch was gone suddenly. You’d have to share the link to the repo you are speaking of to see if there is something consistently different in these. So far the only thing I’m seeing is the version of JupyterLab in the few examples I am looking at for now.


Another advanced trick relating to switching the interface:
From the page you showed in your replay, you can also just change the URL ending from /lab (along with anything to the right of lab) to /rstudio to change the interface as well when you are already in a launched, running session. That’s slightly less to add than ?urlpath=rstudio.

1 Like

Thank you again for your help!! Changing the url in a session from /lab to /rstudio worked perfectly and the students are able to do the lab! I don’t believe a build was triggered in my repo but I’m not completely sure. Here is a link to the repo we are working from (GitHub - jgblanc/HGDP_PopStruct_Exercise: A classroom exercise using HGDP SNP data to introduce population structure concepts) This is an old repo and I’m guessing it might be a version issue. I checked and the version of JupyterLab I’m running is is 3.1.17

Still no explanation to offer you as to why the difference now.
Yes, no one on your side would have triggered a rebuild since until it was updated within the last 24 hours, nothing had changed in the repo since 2020. Sometimes new builds happen if you end up at a different domain of the MyBinder federation due to traffic / resource demand. But you use this a lot and I suspect you’d end up back on the domain you mostly use by now.
Also randomly new builds can happen if the system’s need clearing out. I didn’t notice anything lately and I use it a lot, and my old ones still seem intact. So I don’t think that has happened. Definitely odd.

If you wanted to test, you could make a new repo based on the r-conda template and see if that has the button on the launcher like my example does.
Your current repo is using the older install.R-route that isn’t as flexible as the r-conda one. The buildpack (I think that is what is called behing-the-scenes) for the install.R-route` could have gotten changed recently. I’m not quite sure how to check into that right now. However, if and when we have a more complete story it may be worth asking at the gitter/binder chat.