Sommaire |
---|
Introduction
rpy2 is a powerful interface that allows you to run R code from within Python. This is particularly useful for leveraging R's robust statistical packages while taking advantage of Python's general programming capabilities.
Load module on server
module load python3/miniconda312
source activate rpy2
Installation
...
First, you'll need to install rpy2
. You can do this via pip:
pip install rpy2
...
- not needed!
In case you want to install the package yourself, you can follow the following recipe:
conda install conda-forge::rpy2
conda install conda-forge/label/broken::rpy2
conda install conda-forge/label/cf201901::rpy2
conda install conda-forge/label/cf202003:rpy2
Using rpy2 in Python
- Import necessary libraries:
...