1,210 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
2
answers
205
views
rpy2 error: sh not recognized & API mode Importerror
I am using Python 3.11 / 3.12 , R 4.3.1 and VScoding for my work combining analysis from both Python and R code. rpy2 has been installed already. I have got error message and code stops here.
>>&...
0
votes
0
answers
264
views
rpy2 on Windows prints "Error importing in API mode ... only ABI" — how to force ABI mode and suppress the message across Flask and pytest?
I’m developing a Flask app on Windows that calls R via rpy2. On every run or during pytest collection I see this message:
Error importing in API mode: ImportError('On Windows, cffi mode "ANY"...
1
vote
0
answers
52
views
How to call R's stlm() from Python using rpy2, getting "missing value where TRUE/FALSE needed" error
I’m using rpy2 in Python to call R's forecast::stlm() function from within a custom wrapper function defined in R. My goal is to fit a seasonal time series model (STL + ARIMA) on a univariate time ...
0
votes
1
answer
29
views
KeyError in _rinterface_capi.py
I've been using rpy2 for several years without issue. All of a sudden, it occasionally throws a KeyError in rpy2/rinterface_lib/_rinterface_capi.py, line 71, in the _release method:
69 def _release(...
0
votes
0
answers
55
views
Can't install R in Heroku deployment
I'm trying to install the R buildpack for rpy2 for my website built with Django and React, but I keep getting an error on deployment and I have no clue what's going on. I've checked my buildpacks a ...
0
votes
0
answers
69
views
Errors in the post-hoc analysis in pymer4: Variable is not in the dataset
I am performing a post-hoc analysis after a GLM analysis:
model = Lmer(formula='latency~ C(Velocity) + (1|subject)', data=df)
model.fit(factors={"Velocity": ["16","24",&...
0
votes
1
answer
117
views
How can I get rpy2 to successfully install or access the tidyverse within Linux?
I am attempting to use the tidyverse within rpy2 (version 3.5.16) on my Linux Mint computer. I figure that there are two potential ways to accomplish this task: (1) Using the tidyverse installation ...
1
vote
1
answer
90
views
Error importing rpy2.robjects in AWS Lambda: No module named '_cffi_backend'
I am working on an AWS Lambda function that integrates a Python Flask API with an R machine learning model using rpy2. However, I encounter the following error when trying to import rpy2.robjects:
...
-1
votes
1
answer
57
views
error importing rpy2 and pandas into vscode
import rpy2.robjects as robjects from rpy2.robjects import pandas2ri import pandas as pd
above are the relevant lines of code
here are the error messages i'm getting
Import "rpy2.robjects" ...
1
vote
0
answers
282
views
Error when installing rpy2 with pip, cannot find libffi.a
I am working on Rocky Linux and I want to work with R through python.
I have already installed R successfully.
Now I want to install rpy2, and pip install rpy2 fails with error:
creating build/temp....
0
votes
1
answer
82
views
Different output for rpy2.ipython library and default R
Alternative question: RStudio and Jupyter Notebook produces different output
This may look like too trivial QA, but if debug is not easily available within R binary package, it's not a prior knowledge ...
halt9k's user avatar
- 1,065
1
vote
1
answer
174
views
How to install this R-Package 'rcompanion' on Python?
I would like to know how to install the R package 'rcompanion' on Python. I have been able to install other R packages, this particular 'rcompanion' does not appear to install correctly.
See doc here
...
0
votes
0
answers
144
views
Which versions to install to make RandomFields, RandomFieldsUtils, rpy2 compatible?
I am hoping to install some packages that people no longer update.
I need RandomFields (https://cran.r-project.org/src/contrib/Archive/RandomFields/), RandomFieldsUtils (https://cran.r-project.org/src/...
0
votes
0
answers
139
views
Loading R libraries in Jupyter notebook using Rpy2 and R Magic results in error
I am trying to load several R packages like such:
%%R
# Load libraries from correct lib Paths for my environment - ignore this!
.libPaths(.libPaths()[c(3,2,1)])
# Load all the R libraries we will ...
1
vote
0
answers
81
views
Run mgcv package in python via rpy2
I am trying to create a python package to run mgcv in R, to replace the functionality of pyGAM. I want to start with the r command gam(), and need to use rpy2 to transfer data from R. I don't know how ...