Although we can use Anaconda’s native functionality to create R environment, as of this writing, the functionality only installs R version 3.6. We can create a new R environment with the latest R version following these steps:

  1. Run Anaconda cmd
  2. conda create –name r4-base #create a new environ called r4-base
  3. conda activate r4-base
  4. conda install -c conda-forge r-base
  5. conda install -c conda-forge/label/gcc7 r-base
  6. conda install jupyter

Once you run the second step, Conda would show you where the directory of the environment. Next you need to navigate to R.exe resides in the subdirectory of the environment.

If the environment directory is D:\Programs\Anaconda\envs\r4-base\, then R.exe should be in D:\Programs\Anaconda\envs\r4-base\lib\R\bin.

Execute R.exe, then run the following commands

  1. install.packages(‘IRkernel’)
  2. IRkernel::installspec()

That’s it. Now you can use the latest R version in Jupyter.

Thanks to these two posts:

  1. Link 1
  2. Link 2