Use of R packages in Jupyter

Hi, I have been facing the worst experience of running different R packages at Jupytar Notebook. For example; FPP3, tssible, ggplot2. I have tried by ‘install. Packages()’ and also conda environment. Everytime it comes some Nonzero status output and failed to install. I am kind of new to coding. Any help to install these R packages in Jupytar will be highly appreciated.

1 Like

I know that ggplot2 installation should be fairly straightforward. I cannot speak to those other two packages. Perhaps starting with ggplot2 installation as your goal before trying those others?

Where are you trying to do this? You have posted under the category of JupyterHub. Yet in your post you only mention Jupyter? Is it your JupyterHub?

You mention conda. Did you set up Jupyter using the Anaconda distribution? Does Jupyter notebook launched via the Anaconda navigator work for Python? service is actually a modified JupyterHub. Perhaps gong through the steps of installing R and ggplot to work in Jupyter Notebooks there would be helpful for you to better understand what is involved? You say you are rather new to coding. You can see in sessions launched from here that ggplot2 works in a Jupyter notebook backed by an R kernel? (When the session opens, choose the R kernel to open a notebook and try running the code library("ggplot2") to see it runs without an error.) You could see if you can get ggplot2 to work from your own repo or gist where built more simply as a learning endeavor with the hope you can apply some of what your learn to wherever you are struggling at present.

@Ahmed_Nazmus_Sakib You posted a similar post under a thread was last touched 9 months ago and was very specifically under the topic of setting up a repository so it would work in launches via the MyBinder service to install the package sf, hence the Binder and repo categories. If you post isn’t pertinent there, please delete it?

1 Like

I can’t speak much to doing things “the R way,” without logs.

As for conda: r-fpp3 and r-tsibble do not exist on conda-forge… yet. CRAN packages are often fairly straightforward to add to conda-forge, but as a community-driven source of built binaries, someone needs to ask for them. However, once they exist, they are generally fairly easy to keep up-to-date.

The “easy way”:

I am not an R user, but there are a number of folk in the conda-forge communiity that are.

The “hard way”:

It’s hard, but not that hard, and you might never have to actually build them locally.

  • git clone
  • edit packages.txt to contain:

Are you attempting to install these packages from a notebook?
If so, you would you mind going to the terminal, enter R and then attempt to install the packages one by one and if any error comes up paste it here?

Here is a step-by-step walk-through for notebook and lab:



1 Like