How can I update the R home directory in Jupyter Lab? - r

I am having a hard time updating my R version in Jupyter Lab. I downloaded the most recent R version (4.1.3), but Jupyter still appears to be pointing at the wrong R folder / old version of R (4.1.0). Can someone help me with how to update which version of R jupyter is using?
I don't use Conda, which may complicate things.

Related

Installing R Language on Jupyter Notebook

I've checked all the resources and tutorials from the internet and it seems all are requiring to install Anaconda just to build the R kernel.
Is there a way to add R kernel to my jupyter notebook without installing Anaconda? If so, how?
Thanks!
I've solved my problem, by installing R into my machine. Upon installing, run the application and I follow this tutorial, by just copying the stated command.
Here's the link for the installation of native R.

How best to update / upgrade RStudio inside or underneath Anaconda Navigator?

The version of R Studio that is bundled with the latest release of the Anaconda distribution is over a year old RStudio in Anaconda Navigator, specifically version rstudio-1.1.456. If I check the Rstudio website current RStudio download, it says the latest version is RStudio-1.2.5033.exe.
I want to use the current RStudio release. Anaconda Navigator package manager doesn't give me an option to install any later versions. Also, Anaconda put my R-dedicated virtual environment (which I named Rdev') and installed R in a wierd place too:C:\Users\rlysakow.conda\envs\Rdev\Lib\R\bin`.
My judgement is that R and RStudio are basically UNIX programs that have been ported to Windows, and have all kinds of "leftover" Unix-izms and quirks in the way they reference files, directories, and scripts. Plus, Anaconda makes a lot of choices without always asking the user about where to put things.
It looks like to get a good RStudio update, I must update RStudio from within RStudio, but this will likely break a lot of Anaconda R functionality. RStudio doesn't use Anaconda Navigator's conda program to do the upgrade. The Anaconda Navigator's conda package index will likely not reflect the changes that RStudio makes.
Before I make a likely irreversible and breaking change to Anaconda, can anyone recommend a better way to do this Rstudio update and have Anaconda's package index correctly reflect changes that RStudio will make with executables and packages that it updates and installs?
Please do not recommend something like "ditch Anaconda and just use RStudio for all your R work", because that doesn't allow easy integration with Jupyter Notebook and the conda package manager inside Anaconda. I could install Jupyter Notebook separately, but then I have to manager that outside of Anaconda too. The end users of my application want to use Jupyter Notebook for their R work.

RStudio Install Packages and Package Updates both download then fail with cannot open file

Running happily with R 3.4 and RStudio 1.0.143 under Win10 this problem occured bringing project development to a halt. Downloads each occur and are unzipped and then the a presumably first file in the first item gets:
Error in install.packages : cannot open file 'C:/Users/Admin/Documents/R/
win-library/3.4/file30504386b80/rJava/javadoc/resources/background.gif':
Permission denied
and the prompt returns.
Updating to R version 3.4.1 (2017-06-30), RStudio Version 1.0.153 was to no avail. Using the OS to remolve all R versions and trying again with 3.4.1 did not work. Removing R again and deleting the R directory to refresh the library did not work. My virius software like to tell how helpful it has been and has not, so that issue seems unlikely.
Giving the user full control of the R library did not help.
could package-updates be a tag like install-updates?
It looks there is a problem between Java and rJava.
You should try reinstalling Java using chocolatey package manager (https://chocolatey.org/) and then reinstall rJava package.
I had a similar issue two weeks ago on a windows laptop.
I had this problem for a long time. only in RStudio.
Install the package on R and Library it. Go to RStudio and require the package.
It works!

Specify R for Jupyter Notebook with Anaconda Windows

I feel pretty comfortable working with R, and I want to get into Python through Anaconda.
Upon trying the Jupyter Notebook and finding it has compatibility with R, I really want to use it.
I'm having problem installing the R packages that don't come in R-essentials; and mainly because I noticed it uses a different R installation than the one I had before. Not only is this a different R installation, but it also uses a previous version of R. In my local installation I have updated to 3.2.3 but in the Anaconda environment for Jupyter I got 3.1.
I also found a post to change the .libPaths variable to include the packages that I had already installed. Still, I see this as a potential problem because of the different R versions.
I wanted to know if I can update the R version that's used in Anaconda, or if I can point to the one that's installed locally.
Thank you.
You can install IRkernel in the normal R installation and then register the kernel: simply follow the instructions at http://irkernel.github.io/installation/

specifying R library path for RKernel in Anaconda Jupyter notebook

First let me preface this with the disclaimer that I'm new to R, but a longtime Python power user. Given that I love the conda ecosystem and the Jupyter notebook, I'm trying to set them up as my R development environment as well.
So using the instructions at: https://www.continuum.io/blog/developer/jupyter-and-conda-r I've set up a Jupyter Notbook that using an RKernel that should be hitting the installation of R installed in my Anaconda folder (I would think anyway).
Getting it setup was easy peasy and everything is working great for standard R stuff but my analysis requires some R libraries that are not available in r-essentials channel. No problem, I think I know how to install an R library. I go to "C:\Anaconda\R\bin\x64\Rgui.exe" and install rgdal, dismo, and some other packages. To check my work I looked in C:\Anaconda\R\library and there they are.
But when I run a jupyter notebook from the Anaconda command prompt. And start a new R notebook I get a "Error in library(dismo): there is no package called 'dismo'" Wait a sec, I run a ".libPaths()" from the notebook and it looks like its pointing
You can add .libPaths('path_where_your_packages_are') in a code cell at the beginning of your notebook to tell jupyter where your packages are. For me that was .libPaths('~/R/win-library/3.2') (work-around from discnerd who filed this issue on github).
To find out the path to your packages, just install a random package in R and wait for the location to be printed to the console.
More details (likely specific to my system/installations): When running .libPaths() in R, I got 2 locations: one for which admin rights were required for writing, and one for which admin rights were not required for writing. While packages installed through R land in the location where admin rights are not required, jupyter looks at the location where admin rights are required.
You can find out the path to your library with installed.packages()

Resources