'Getting an R Notebook to work in Jetbrains Dataspell

So I am just starting a data science/stats class and I am trying to setup a R notebook within Dataspell I am able to create a Jupyter notbook but it only wants a python interpreter and I can't seem to change the interpreter to R

dataspell

python

enter image description here

I only allows me to set a python interpreter. I am able to run R files just fine but I am trying to do it in a notebook. (Whether that be Jupyter or some other notebook I couldn't care less)

I would like to stick to Jetbrains IDE's either Dataspell or Pycharm. I tried our Datalore and got an R notebook working but its really slow for me.



Solution 1:[1]

DataSpell can be a little difficult to navigate. In any case, File>New... pops up a menu:

New Popup Menu

Pick "RMarkdown File", which your purposes will work the same as a notebook. RStudio has both markdown and notebook options, but they still have an Rmd extension.

You should also see a R Console button at the bottom of the screen.

Solution 2:[2]

Actually, there's an (currently - as of May 2022) undocumented feature in Dataspell 2022.1 which they have been developing which supports R kernels in Dataspell as an IDE.

If you have an Conda environment which has R and the irkernel installed and configured (for instance, if you set up your Anaconda environment to run Jupyter notebooks with the R kernel), you can open existing R notebooks in Dataspell and run them just like Python notebooks. The only thing you can't do is create new ones, sadly.

Basically, just use Anaconda or Miniconda to create an environment which can run Jupyter notebooks with the irkernel, create your notebooks in Jupyter, then point your Dataspell directory at it and it should work.

They do mention that it's a developing feature - so if you encounter bugs, you can flag them in the Dataspell issue tracker. I tried it and it worked pretty well so far.

You can see an example of my R kernel running in Dataspell here: Example

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 John Morris
Solution 2 Jonathan Graves