Rpy2 crushing when running it multiple times in the same python script
I have a python script that I use with rpy2, however in my code I need to repeatedly use R code, I do so by using the rpy2.robjects() function.
I have noticed that the first run of the R code works perfectly, no errors and no crushes. However while going into the second loop, I get the following error:
Rpy2 crushing when running it multiple times in the same python script
I have a python script that I use with rpy2, however in my code I need to repeatedly use R code, I do so by using the rpy2.robjects() function.
I have noticed that the first run of the R code works perfectly, no errors and no crushes. However while going into the second loop, I get the following error:
Why is the pandas dataframe that I am converting into a R data matrix using rpy2 not retaining the dimensions of the original dataframe?
I am trying to get an R package to work in a Python script using rpy2. I have done what I can to set up the Python code so that it can work with with the functions of this R package, which uses statistical approaches to replace NaN values in numerical data. I have written a minimal reproducible example of my code below:
How can I figure out what is going wrong with this R function that have been imported into my Python script using rpy2?
I have installed the package “msImpute” (https://github.com/DavisLaboratory/msImpute), which is a package that is used for looking at protein data from mass spectrometry data and filling in missing values using statistics. It works fine within R, but I am having trouble importing and using it in Python. I have imported using the rpy2 package like so: