Questions tagged [pyrserve]

A Python client to remotely access the R statistic package via network

pyRerve is a library for connecting Python to an R process (an excellent statistic package) running Rserve as a RPC connection gateway. Through such a connection variables can be get and set in R from Python, and also R-functions can be called remotely. In contrast to rpy or rpy2 the R process does not have to run on the same machine, it can run on a remote machine and all variable access and function calls will be delegated there through the network.

Furthermore - and this makes everything feel very pythonic - all data structures will automatically be converted from native R to native Python and numpy types and back.

20 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
20
votes
1 answer

Store large data or a service connection per Flask session

I'm writing a small Flask application and am having it connect to Rserve using pyRserve. I want every session to initiate and then maintain its own Rserve connection. Something like this: session['my_connection'] = pyRserve.connect() doesn't work…
alexizydorczyk
  • 850
  • 1
  • 6
  • 25
5
votes
2 answers

How can i connect pyRserve with Python

i need to connect pyRserve in iPython, but there is an error when i try to connect it. This is the error. conn = pyRserve.connect() And this is what i get: RConnectionRefused: Connection denied, server not reachable or not accepting…
3
votes
1 answer

Parallel Programming in pyRserve using celery

I have a data-frame consisting of Time Series. Date Index | Time Series 1 | Time Series 2 | ... and so on I have used pyRserve to run a forecasting function using R. I want to implement parallel processing using celery. I have written the worker…
2
votes
1 answer

Using R package pmultinom with PyRserve

I am trying to utilize the R package pmultinom in Python by using pyRserve, with numbers that are imported to the code. I am having the following error: REvalError: Error: object 'pmultinom' not found. import pyRserve num1 = 1 num2 = 2 num3 = 3 num4…
user156220
  • 23
  • 2
1
vote
2 answers

R, Python and pyRserve - multi-threaded examples?

I have a Python script set up where it instantiates Rserve, sets up a few R scripts and functions and then runs some data against the functions. However, I have been unable to create a multi-threaded instance of this same process. My core issue is…
Unknown Coder
  • 6,625
  • 20
  • 79
  • 129
1
vote
1 answer

Python script keeps running when using pyRserve

I am trying to learn how to send a list of lists in Python to R -script which runs statistical methods and gives two or three data frames back to Python I stumbled across the pyRserve package. I was able to follow the manual in their documentation…
user2162611
  • 146
  • 3
  • 13
1
vote
0 answers

pyRserve data.frame to matrix conversion

I think I found an error in pyRserve but don't know where to report it. When I use pyRserve I can get an R matrix in the expected way: import pyRserve con = pyRserve.connect(host = 'localhost') # this is a bug too in windows testMatrix =…
Kyle
  • 401
  • 4
  • 10
0
votes
1 answer

Rserve: pyServe not able to call basic R functions

I'm calling Rserve from python and it runs for basic operations, but not if I call basic functions as min import pyRserve conn = pyRserve.connect() cars = [1, 2, 3] conn.r.x = cars print(conn.eval('x')) print(conn.eval('min(x)')) The result…
wakeup
  • 67
  • 7
0
votes
0 answers

Call auto.arima from Python via pyRserve

I have been trying to use the pyRserve for time series forecast and intent to use the auto.arima function in R. I used the following code to solve the problem of functions with a dot in their names such as auto.arima: import pyRserve import pandas…
Mike
  • 1
  • 1
0
votes
1 answer

Using PyRserve to call library(foreign) in Python

I am trying to load a SPSS file into a Pandas DataFrame in Python, and am looking for easier ways to do it from more recent developments in using R codes in the Python environment, which lead me to PyRserve. After connecting to PyRserve, import…
Carl H
  • 1,036
  • 2
  • 15
  • 27
0
votes
1 answer

Multiple connections with shared memory using PyRserve

I am using PyRserve. I am want to perform some R evaluations from multiple running python processes. All these evaluations need to use the same global variables, so it would save a lot of time if every new connection could use these variables after…
abhgh
  • 308
  • 1
  • 9
0
votes
0 answers

subprocess.Popen still waits when starting Rserve

Local system: OSX 10.10.3 Yosemite Python 2.7 Remote Server: NAME="Amazon Linux AMI" VERSION="2014.09" I'm trying to use Python to start (restart) the Rserve processes on the server. I'm able to start it as ec2-user either directly ($R CMD Rserve…
RightmireM
  • 2,381
  • 2
  • 24
  • 42
0
votes
1 answer

Memory management with Rserve on Windows

I need to perform various tasks with Python: sensitivity analysis, optimization and simulation launching. However the first postprocessing of simulation results relies on R and a bulky database stored in Rdata (8 Gb with some data tables…
Antoine Gautier
  • 623
  • 8
  • 25
1
2