Creating an R environment using anaconda

Viewed 4844

I want to create a new R environment using anaconda. Following this page 'https://docs.anaconda.com/anaconda/user-guide/tasks/using-r-language/' I created an environment called eeEnv_r using this command in anaconda prompt conda create -n r_env r-essentials r-base. However the environment that was created looks like it was python environment. But when I type conda list I see some r packages such as dplyr appearing in addition to some python packages. Also there is python.exe file in environment folder. Any ideas why this is ?

I am trying to use VS code to run R, since I am familier with the IDE (used for python work). Also I want to create environments in R and then use those environment ins VS code (similar to python).

1 Answers

r-base depends on glib``notebook, which depends on python, therefore installing the latest r-base package will always pull in a python interpreter as well.

I would look at this from a different angle: with conda there is no such thing as a python or r-environment environments can mix packages from various languages. For most use cases this should not be a problem.

Related