Question
How do I use the R reticulate package to manage R-Python integration?
Answer
1. Create and activate a new conda environment for use with R & Rstudio.
2. Set conda-forge channel to highest priority in channel list.
3. Install any python packages needed to be used in the conda environment.
Example package: pandas
Note: If using pandas as the example in Steps 8 & 9, pandas will need to be installed in Step 3.
4. Set path and launch Rstudio.
5. Create new R project without renv. The below instructions can be followed, but do not check the renv box.
6. In the Rstudio console, install reticulate package using install.packages().

7. Load the reticulate package using library().

8. Back in Anaconda Prompt,
a. Enter "conda env list" to list conda environments.
b. Copy active environment to the clipboard.
Example active environment: rs_t3

9. In the Rstudio console, configure the conda environment using use_condaenv().
Example: use_condaenv(condaenv = "rs_t3")

10. Install python libraries using py_require().
Example: py_require("pandas")

11. Import & use modules.
Example: pandas <- import("pandas")
