Entering edit mode
14 months ago
scarlettpigany
•
0
Hello,
What is your opinion on the use of rpy2 for executing an R script within a Conda environment from a Python script? I'm currently facing a scenario where I have an R script and the requirement to run it within a Conda environment through a Python script.
What is your question? Packages like that have their usecases. I personally am more on the opposite site that I use reticulate when I have to call native python functions from inside R, but this is probably the same principle here. Alternatively, use a Rmarkdown or JupyterNoteBook to have multiple languages in a single analysis document.
I have a pipeline coded in Python and an extra script coded in R, and I want to automate the entire process using Python that's why I'm asking the question about rpy2
Are you reinventing Snakemake? Alternatively, just do a system call to run the Rscript. See https://stackoverflow.com/questions/19894365/running-r-script-from-python
I appreciate your suggestion and I'm aware of the existence of Snakemake, which is a powerful tool for managing workflows. However, in my current scenario, I'm exploring different options