Questions tagged [pyper]

PypeR is a Python library that can be used to call R functions via PIPE

External links:

14 questions
65
votes
4 answers

How do Rpy2, pyrserve and PypeR compare?

I would like to access R from within a Python program. I am aware of Rpy2, pyrserve and PypeR. What are the advantages or disadvantages of these three options?
DanB
  • 3,755
  • 4
  • 22
  • 22
54
votes
3 answers

Python interface for R Programming Language

I am quite new to R, and pretty much used to python. I am not so comfortable writing R code. I am looking for python interface to R, which lets me use R packages in pythonic way. I have done google research and found few packages which can do…
darshan
  • 1,230
  • 1
  • 11
  • 17
2
votes
1 answer

Python and R: how do you show a plot with Pyper in a Jupyter notebook?

I am creating a report using Jupyter. Most of my code is in Python, but I need to use some R functionalities. I use a package called Pyper to call R in Python. It works well, but I could not figure out how to display a plot made in R (via Pyper) in…
Michel Mesquita
  • 743
  • 7
  • 17
2
votes
1 answer

PypeR issue "global name 'dump_stdout' is not defined"

Hello and thanks in advance. I am attempting to run a very simple code in Python using the PypeR module to run R scripts in my Python code: #Writing Some Python Code to interface with R from pyper import * import sys import os import pandas import…
gtnbz2nyt
  • 1,465
  • 3
  • 17
  • 33
1
vote
0 answers

PypeR suddenly stops working when two or more users use it

I am using Pyper as a way to connect Python to R using Django framework ,I am using it in a way that i am running r script through pyper using r.run("source('"+path2script+"')"). But i am running into an issue where pyper suddenly stops when two or…
1
vote
0 answers

Permission error when trying to run R from Python using pyper

I'm trying to run R in python through pyper, but I'm getting this OSError: r = pr.R(RCMD="/Library/Frameworks/R.framework/") --------------------------------------------------------------------------- OSError …
keybattle
  • 11
  • 1
0
votes
1 answer

Pyper error: [WinError 2] The system cannot find the file specified

I'm trying to work with the pyper library in Python. I've been following along with the example here, but I keep running into an error. It doesn't seem like the pyper library is working for me at all. import pandas as pd import pyper as pr r =…
Kevin Gregory
  • 89
  • 1
  • 11
0
votes
1 answer

Executing R files from inside Python using PypeR

My current work project is on writing a Python program that must at various points rely on R. Since I don't know R so well, and the person helping me doesn't know Python so well, the actual R code is not in my program. Instead, he opened Notepad,…
J.D.
  • 139
  • 4
  • 14
0
votes
0 answers

How to fix '[WinError 5] Access is denied'

So i use anaconda for all this, the problem is when i try to do: r = pyper.R(RCMD="D:/Apps/Anaconda/envs/rstudio/lib/R",use_pandas='True') but then the error apear : PermissionError Traceback (most recent call…
0
votes
0 answers

Function returning None with pyper

I tried to create a function for the following from pyper import * import pandas as pd r=R(use_pandas=True) r.assign('xN', 5) r.assign('yN', 3) r('out1 <- xN + yN') print(r.get('out1')) 8 created function def addR(x, y): r=R(use_pandas=True) …
0
votes
1 answer

I can't make PypeR run anymore

I can't run the wonderful PypeR (r to python interface) anymore. I can import it, but as I try to run it it crashes. I suspect it is because I installed El Capitan OSX. I tried to install update pypeR with no success. when I run it with: e.g. r =…
DaniPaniz
  • 1,058
  • 2
  • 13
  • 24
0
votes
1 answer

PypeR fails if R using library(tm)

I am using PypeR in my Python Application and want to get a variable from a R script. My Python Application is as follows: from pyper import * r = R() r.run("source('/test.R')") words = r.get("words", "No Variable found!",…
Heiko113
  • 11
  • 2
0
votes
1 answer

Unable to execute user defined function using pyper

I am trying to read data through python in my web app and then analyze it in R. For this I am using pyper to perform the analysis. While creating a function, I get the output only if I write a single statement in function definition. But if I write…
-1
votes
2 answers

Pyper: prediction returns None though the model works well in R

I am struggling with the following issue. I trained a model and loaded the trained model in R as follows: model <- readRDS("C://tests/my_model.rds") result <- predict(model, trainset, type = "prob")[, 2] Everything works well and I can get the…
Fluxy
  • 2,838
  • 6
  • 34
  • 63