The Rstudio is opening using BinderHub but the plots are not showing in the “Plots” or “Viewer” panel.
This is the link for my Binder.
The Rstudio is opening using BinderHub but the plots are not showing in the “Plots” or “Viewer” panel.
This is the link for my Binder.
Please when sharing a link, share the launch URL . Or link to the repo that is what you point MyBinder at.
What you shared in your post, was your temporary instance that disappeared 10 minutes after you last used it.
You may want to study the URLs that show up when you hover over launch badges to get a sense of what that pattern is for what is good to share, and compare it to what you shared.
I think this is what you meant to share ?
Binder session: launch URL
and
Repo: repo here
I see that you are one of the contributors. Was it working before and now it isn’t?
Also, the way you are using R on Binder works but it takes forever to build. There are ways now using conda that result in much faster builds.
See here.
I have a recent example using it here and that plot opens in the ‘Plots’ panel if you follow the directions I spell out for RStudio where I linked.
I see yours not working as you report.
The issue is described right at the top if you trigger only the first code line of sentiment_analysis.R
script to run:
> library(syuzhet)
Warning message:
R graphics engine version 14 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.
Version I see from your repo under Help
> About R Studio
:
RStudio
Version 1.2.5001
© 2009-2019 RStudio, Inc.
Build 93 (7b3fe265, 2019-09-18)
However, I see the same version where the ‘Plots’ pane work from the link and script I described above:
RStudio
Version 1.2.5001
© 2009-2019 RStudio, Inc.
Build 93 (7b3fe265, 2019-09-18)
And I don’t see any warning when running code there and the ‘Plots’ pane works.
This makes me think that the library syuzhet
has the issue.
I looked some into that message and it says it happens sometimes when you have a very recent version of R and older RStudio. In relation to that:
I also note that where ‘Plots’ works I have kept it at R version 4.0.5. version.string R version 4.0.5 (2021-03-31)
. I had described the issue that made me stay with 4.0.5 at the time here.
And where you are trying to run code it is R version 4.1.0. version.string R version 4.1.0 (2021-05-18)
Have you tried rolling back your version of R?
Sorry for sharing the wrong link. Yes, you shared the right binder session and repo. The problem is not with the library(syuzhet)
as when I tried running the rest of my 5 repos with different libraries, the same problem occurred where the plots were not showing. Around 1-2 months back all plots were showing and Binder was working fine with my version of R.
I changed my R version to r-4.0-2021-05-19
and it still did not show the plots. I tried this R version 4.0.5 (2021-03-31)
too but it showed an error that Binder does not support this version similar to the new 4.1.0 version.
The r-conda
did not work for me.
The problem is with older RStudio version while using the Binder. How can I use different version of RStudio that is compatible with R versions >=4 in Binder?
The rstudio stuff is rather bespoke. There is an open issue on repo2docker
(the tool that builds all the containers, as opposed to binderhub, which launches them): Current RStudio version does not support R 4.1.0 graphics engine · Issue #1041 · jupyterhub/repo2docker · GitHub
Likely one would have to do a custom Dockerfile
to make it work today, though getting it working for everyone would likely be the high road.
What didn’t work? If it was the twitteR
library, I saw that issue, too but worked out a couple ways around it, see below. (The path of least resistance ended up being to install the twitteR
library, using R and not switching the script to use rtweet
instead. Because I assume, more that than that one script would need changing?)
The upshot is that using r-conda
to install, I’m seeing the ‘Plots’ panel work again.
I forked you repo and converted it so you can use that as a guide if you like. My fork is here. It’s currently using R 4.0.5.
FWIW, I’m seeing issues with the r-twitter package, too, when trying based on the r-conda binder example:
Problem: package r-twitter-1.1.9-r36h6115d3f_0 requires r-base >=3.6,<3.7.0a0, but none of the providers can be installed
And the repo for that package says it is deprecated and to use rtweet instead.
I found I could install twitteR
still if I didn’t rely on conda to do it and moved it to having R install it using an R script triggered by postBuild.
And for the record, I tried it retweet
instead, with no installation of twitteR
and sentiment_analysis.R
worked when the call to library twitteR
was replaced with rtweet
. However, RStudio showed a message that twitteR
was needed but was not installed. (Probably triggered from tm
or syuzhet
somehow.) Installing it but not using it, makes that warning go away.
This might be moot if you end up using older R (or installing via conda) anyway; however, just sharing what I saw about this.
The r-conda
route works to make the plot show correct again today as well. See my updated post above.
Yeah, we do what we can on conda-forge
to support keeping the R ecosystem working, but especially the rstudio stuff is… rather opaque.
Thank you so much for taking your time for helping me out!!!
We have been running into issues upgrading the latest RStudio with the Berkeley DataHub (and I suspect with Binder as well) due to this bug in RStudio:
Is that something anybody else has found a workaround for? Otherwise I worry that JupyterHub-based tools won’t be able to use any newer versions of RStudio until it is fixed.