+1 vote
ago in Programming Languages by (26.1k points)
I need to use some R functions in my Python code, so I want to install R in my conda environment. How can I install R in a conda environment?

1 Answer

+2 votes
ago by (33.0k points)
selected ago by
 
Best answer

In a conda environment, R can be installed by running the following command on the terminal.

conda install -c r r

It should install the r-base. If you need additional packages that do not come with r-base, you can go to the R command line by typing "R" on the terminal. Once on the R command line, you can run the following command to install your desired package.

install.packages("packageName")


...