Reputation: 175
I've installed R version 3.5.1 for windows and copied its contents to the R folder used by Anaconda3. However conda still identifies the current version as 3.4.3. Is there a "version id" file somewhere in the Anaconda3 folders?
Upvotes: 3
Views: 4476
Reputation: 662
Short solution
In short you need to install a the IRkernel
package in the version of R you want to use with Jupyter and then make it available to Jupyter. See here.
Diagnosis
You may not be aware that you have two installations of R. To confirm this is the case in a Jupyter Notebook, type:
R.version
This should return values such as:
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 4.3
year 2017
month 11
day 30
svn rev 73796
language R
version.string R version 3.4.3 (2017-11-30)
nickname Kite-Eating Tree
Now open RStudio or RGui and input the same command, you should see different output (ignore any warnings):
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 5.0
year 2018
month 04
day 23
svn rev 74626
language R
version.string R version 3.5.0 (2018-04-23)
nickname Joy in Playing
Note the differences in the version.string
and nickname
variables in particular.
Now in your Jupyter notebook type:
R.home()
Which will give the output like:
"C:/Anaconda3/lib/R"
The same command in RStudio or RGui will return a different path e.g.:
"C:/R/R-35~1.0"
The above values may not match those on your machine, but if they are different to each other the following steps will allow you to use the latest R instance from Jupyter.
Longer solution
R.home()
path from Rstudio (or RGui)cd /d "C:/R/R-35~1.0"
where the path is the same as the one you have copied. Hit return.cd bin
. Hit returnR.exe
to launch the command line R from that directoryIRkernel
. This package makes the version of R callable as an Jupyter kernel. Type install.packages('IRkernel')
and hit return.IRkernel::installspec(name = 'ir35', displayname = 'R 3.5.0')
to create the latest R kernel. Note you can change the name and display name to be whatever you wish.Upvotes: 6