IRKernel upgrade R not recognized - r

I have anaconda installed and use their version of jupyter notebook. I installed R
and IRKernel to make use of R in jupyter.
I can install packages on this version of R (3.5.1) and use them in jupyter.
I have installed a new version of R (3.5.2) using upgradeR() without problems.
To add this version to Jupyter I tried IRkernel::installspec(name = 'ir52', displayname = 'R 5.2') in R but this doesn't work.
I did this using R in jupyter notebook and this gave no errors and I can select the new kernel.
But when I select the R 5.2 kernel and do 'version' this gives the 5.1 kernel. What have I done wrong?

Related

Jupyter notebook/Anaconda thinks I don't have newer version of R installed

I've downloaded the latest version of R onto my machine. I've also successfully followed the steps in the article below to install r-4 base through Anaconda:
https://datascience.stackexchange.com/questions/77335/anconda-r-version-how-to-upgrade-to-4-0-and-later
After typing 'conda install jupyter' into the Anaconda terminal it returns "# All requested packages already installed.", yet I cannot use newer libraries in Jupyter notebook and running "R.Version()" I can see that Jupyter thinks I have 3.6.1 installed.
Any help appreciated. I have R Studio installed and it seems to recognise that I have a newer version ("R version 4.2.0) installed but I need to use Jupyter through Anaconda. I'm on Windows 11 too by the way.

Change R version of the shell on Mac

my R version on the zsh shell is the 3.6 that is different respect to the one of RStudio that is the 4. In fact, using the Jupyter notebook, the R version is the one used by conda. In fact, to install an r package I must run conda install -c r r-package_name. So, this is very annoying. How can I link the R version of Rscript of the shell with the one of the Rstudio?

Change version of R in Jupyter

I have tried uninstalling R and reinstalling a more up to date version. Currently I have R 4.0.3 installed and yet when I run R in Jupyter and check the version it is running R 3.6.1
I have removed R from the Jupyter Kernel and reinstalled and this has not worked, does anyone know how I can change the version of R that is run in Jupyter?

Do I need to reinstall R-Studio if I wish to use Anaconda with R?

I have R (version 3.5.0) installed along with R-Studio (version 1.1.453). I recently installed Anaconda. In order to use Anaconda with R, do I need to reinstall R-Studio? I don't see an option for R notebooks when I launch Jupyter. However, there is an option to install R-Studio in the Anaconda Navigator.
Also, the option for installing R-Studio through the Anaconda Navigator suggests that the version of R-Studio that will be installed will be older than that already installed. Will there be a conflict between the two versions of R-Studio if I select this option?
Use R kernel with Jupyter in Anaconda only need install:
conda install r-essentials

R and Julia Kernels not available in Jupyter notebook

I recently installed the Anaconda3 distribution and I want to have the R and Julia Kernels available besides Python. I use windows 10.
To install IJulia I installed the Julia language and follewed the steps indicated in the IJulia page; everything went fine.
To install the R kernel I used the command conda install -c r r-essentials in the anaconda command prompt, again, no problems. I also installed R.
When I launch the notebook the only available kernel is Python, the R and Julia kernels doesn't appear in the list, I have no clue why this since I got no errors in the installation of IJulia and IRKernel. Anyone could help?
After a fresh installation of Anaconda Distribution (either 2 or 3), following steps should be performed to achieve the desired kernels (R & Julia) on your notebook.
To install R on Anaconda(2/3) Jupyter Notebook :
Open 'Anaconda Command Prompt' & execute conda update notebook to update your Jupyter notebook to the most recent version.
Then install IRkernel by conda install -c r notebook r-irkernel
Now you may open R in your command prompt by running R.exe
Install all necessary R packages using the following lines in the R console by executing :
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ',
'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
Finally, make the R kernel available to your Jupyter Notebook by executing:
Install only for the current user ➡ IRkernel::installspec()
For System-wide installation(all Users) ➡ IRkernel::installspec(user = FALSE)
To install Julia on Anaconda(2/3) Jupyter Notebook :
First, download Julia version 0.4 or later and run the installer. Then run the Julia application (double-click on it); the Julia Console with a julia> prompt will appear.
Now, for the most important step, open 'Anaconda Command Prompt' & execute where jupyter to see the actual path of your Jupyter Notebook. The output will be something like "C:\Users\JohnDoe\AppData\Local\Continuum\Anaconda3\bin\jupyter.exe"
Copy the above location and go to your Julia console. Now, execute the following respectively:
ENV["JUPYTER"]="C:\\Users\\JohnDoe\\AppData\\Local\\Continuum\\Anaconda3\\bin\\jupyter.exe"
Pkg.add("IJulia")
Pkg.build("IJulia") (Optional, execute if further error occurs again.)
⬆ Notice that the backslashes have to be doubled when you type them as a Julia string. I've just assumed that the path is your Anaconda path with \bin\jupyter appended, but replace that with whatever where jupyter tells you.
After few minutes, in Julia console execute:
using IJulia
notebook()
Now, you can program Julia in your Anaconda Jupyter Notebook.
Excellent, it worked.
However, it is important to import the package first before adding it.
import Pkg; Pkg.add("IJulia")

Resources