How-To: Getting Started With R/Rstudio & Python in Conda Enviroment

Question

How do I quickly get started using R/Rstudio and Python together on a University-managed computer?

Answer

1. Install Miniconda. For most usage cases a default installation as performed as your non-administrative user will work best.

How-To: Install Miniconda Without Administrator Privileges in Windows.

How-To: Install Miniconda Without Administrator Privileges on a Mac.

2. Install R.

How-To: Install R From Company Portal

3. Install Rstudio.

How-To: Install Rstudio From Company Portal

4. Create a unique conda environment for each project to avoid dependency conflicts and ensure portablility

How-To: Rstudio: Create Conda Environment for Using Rstudio

5. Add channels to increase the number of available packages and versions.

How-To: Add Channel to Top of List in a Virtual Conda Environment via Command Line Interface.

How-To: Add Channel to Bottom of List in a Virtual Conda Environment via Command Line Interface.

6. Add R and Python packages to the conda environment as needed.

How-To: Using Anaconda - Install an R Package in a Virtual Conda Environment via Command Line Interface

How-To: Install a Package in a Virtual Conda Environment via Command Line Interface.

7. Launch Rstudio in an activated conda environment from the command line.

How-To: Rstudio: Launch Rstudio in Conda Environment From Command Line

8. Use reticulate and rpy2 packages for cross language object utilization.

R projects with embeded Python code:

How-To: Rstudio: Use Reticulate Package to Manage R-Python Integration

Python projects with embedded R code:

How-To: Use rpy2 Package to Manage Python-R Integration

9. Create backups to keep your work reproducible.

How-To: Backup a Virtual Conda Environment Configuration via Command Line Interface.

 

For Additional Assistance

Informational: Best Practices for Managing Integrated R & Python Projects with Conda

Print Article

Related Articles (4)

How to get Python and R talking to each other by using the reticulate package by embedding a Python session within your R session, allowing seamless, bidirectional communication.
Integrating R and Python on Windows can be notoriously finicky. The rpy2 library bridges this gap beautifully, but installing it via traditional methods often triggers a cascade of compilation headaches. Using Conda eliminates this friction by managing pre-compiled binaries and dependencies smoothly.
Index of Advanced Topics for Conda, Python, and R
Best Practices for Managing Integrated R & Python Projects with Conda