Anaconda Jupyter R install - r

Hi I tried to install R for my Jupyter notebook (Anaconda) and used the below command in my Anaconda prompt "conda install -c r r-essentials". But there is an error like below: any suggestions (especially missing package).
(C:\Anaconda3) C:\windows\system32>conda install -c r r-essentials
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata ...Could not connect to
https://repo.continuum.io/pkgs
/pro/noarch/
Could not connect to https://repo.continuum.io/pkgs/free/win-64/
Could not connect to https://repo.continuum.io/pkgs/pro/win-64/
...Could not connect to https://conda.anaconda.org/r/win-64/
.Could not connect to https://conda.anaconda.org/r/noarch/
.Could not connect to https://repo.continuum.io/pkgs/free/noarch/
.
Solving package specifications: .
Error: Package missing in current win-64 channels:
- r-essentials
You can search for packages on anaconda.org with
anaconda search -t conda r-essentials
(C:\Anaconda3) C:\windows\system32>
Thanks

Try this alternative. It worked on my colleague's machine:
conda create -n my-r-env -c r r-essentials
Another approach would be to reinstall Anaconda and execute
conda install -c r r-essentials
Let us know if it worked.

Related

R fails to load igraph in conda environment

I am trying to run an RShiny app in a WSL2 installation of Ubuntu on Windows. I am no expert in R, but I feel this is a problem due to conda interaction with R. I run the following commands:
conda create -n r_env r-essentials r-base
conda activate r_env
conda install -c conda-forge r-shiny
conda install -c r r-visnetwork
conda install -c conda-forge r-dplyr
conda install -c r r-dt
conda install -c conda-forge r-igraph
conda install -c r r-leaflet
conda install -c conda-forge r-rgdal
conda install -c r r-shinydashboard
conda install -c conda-forge r-shinywidgets
conda install -c conda-forge r-shinycssloaders
conda install -c conda-forge r-igraph
When I run R and type in : library(igraph) i get:
->Error: package or namespace load failed for ‘igraph’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/carlo/anaconda3/envs/r_env/lib/R/library/igraph/libs/igraph.so':
but I can list it, it's there:
ll /home/carlo/anaconda3/envs/r_env/lib/R/library/igraph/libs/igraph.so
-> -rwxrwxr-x 1 carlo carlo 3816608 Mar 31 15:38 /home/carlo/anaconda3/envs/r_env/lib/R/library/igraph/libs/igraph.so
Did anybody encounter a similar problem?
The igraph library was meant to load correctly
(My Opinion) I would caution against the use of the r channel and the r-essentials package. The Continuum/Anaconda support for R was a good college-try, but is since outmoded and superseded by the broader CRAN support that Conda Forge provides. Users managing R environments will find a better experience ignoring any Continuum/Anaconda documentation and exclusively using Conda Forge for their R environments. (End Opinion)
Mixing channels can lead to symbol reference errors. Furthermore, sequences of ad hoc installations are subpar - instead specify through a YAML.
The following YAML file works just fine on linux-64, osx-64, and win-64 platforms:
so-igraph.yaml
name: so-igraph
channels:
- conda-forge
dependencies:
- r-base=4.1 # adjust to desired version
- r-shiny
- r-visnetwork
- r-dplyr
- r-dt
- r-igraph
- r-leaflet
- r-rgdal
- r-shinydashboard
- r-shinywidgets
- r-shinycssloaders
- r-igraph
Which can be used with
conda env create -n so-igraph -f so-igraph.yaml
conda activate so-igraph
I was having a similar problem with R on AlmaLinux, and it turned out I was missing some libraries on the OS itself, which I thought I had and that were necessary for some R packages. I think they were these, which makes sense, given that we're talking about igraph, a graphing package:
gsl-devel-2.5-1.el8.x86_64
gsl-2.5-1.el8.x86_64
openssl-1.1.1k-6.el8_5.x86_64
geos-devel-3.7.2-1.el8.x86_64
geos-3.7.2-1.el8.x86_64
proj-datumgrid-1.8-6.3.2.4.el8.noarch
proj-6.3.2-4.el8.x86_64
libtiff-devel-4.0.9-21.el8.x86_64
libgeotiff-devel-1.5.1-1.el8.x86_64
libgeotiff-1.5.1-1.el8.x86_64
Installing openblas may work, see https://github.com/conda-forge/r-igraph-feedstock/issues/19

Install Rdkit in jupyter notebook, using Anaconda enviornment

How to install rdkit library in my jupyter notebook. I am using Anaconda environment.
Inside the anaconda environment, just run conda install -c conda-forge rdkit
You can find detailed installation instructions here.

conda install r-essentials takes forever

I am unable to install the r-base and r-essentials packages into my conda environment. Whenever I run
conda install -c r r-base r-essentials
I just get the Solving environment message for a good hour or more before I just exit out altogether. This even occurs when I create a brand new environment without any other packages before attempting to install r-base and r-essentials.
What is going on here and is there any way to fix this?
Try that. conda install -c conda-forge r r-essentials.
For some reason there is a conflict when r-essentials and pip are in the same conda environment. You can solve it by creating a new environment that has the package directly:
conda create -n r_env -c r r-essentials

How to uninstall r-essentials using conda?

Recently, I installed r-essentials using conda command: conda install -c r r-essentials as it is described in this url: https://anaconda.org/r/r-essentials. However, when I try to run a new R Kernel, ii fails according to this error:
...Anaconda3\R/bin/x64/Rterm.exe' is not recognized as an internal or external command, operable program or batch file.
I want to remove R folder that was created after installation But I cannot find a way to remove that folder.
I tried:
conda uninstall r-essentials
Then:
conda remove R
Last one, according to this answer on reddit: https://www.reddit.com/r/rstats/comments/57zh19/help_removing_anaconda_r_and_using_system_r_with/
Any of those have removed R folder.
Is there an specific command to remove it?
r-essentials is a metapackage, and therefore cannot be uninstalled this way.
Try running conda uninstall r-base to uninstall Anaconda R, and then install R regularly. Then, run which R to make sure that it works. You should now see the path to the system R, instead of the Anaconda R.
I recommend then following the instructions here - this installation worked for me: http://irkernel.github.io/.
to remove r packages, run the conda prompt as an administrator. then execute this command
conda remove r-*
conda uninstall r-base >> jupyter notebook has something file and button
I think you can try $conda list | grep r // see r package files
$conda uninstall r-* // delete all r package

JUPYTER AND CONDA FOR R

I want to use R in Jupyter in windows 7. I have installed anaconda and tried to install "R Essentials" following the directions given in this link. But I am getting "SSL verification error, package not found error" as shown in the screenshot. . I have been using R in Jupyter in windows 8,10 and Mac. I am not sure why it is failing in windows 7.
I set conda to not verify following this answer as shown below and everything worked fine.
conda config --set ssl_verify false
conda update requests
conda install -c r r-essentials

Resources