Alexy Khrabrov wrote:
> -- obviously I need to use numpy array for the matrix. How would I
> load and save t with numpy, select blocks of the matrix without
> copying, and pas on to R? How can one create a data.frame in R from
> a numpy array read in Python -- or would I rather read.table/
> save .rda in R?
As you are happy doing the loading and slicing in R, and this is memory
efficient, I would get rpy to do this in R for you, and then only pass
the slice to python. Try something like this perhaps (untested):
import pry
rpy("t <- read.table(...)")
for run in range(maxruns) :
rpy("r <- t[t$run == %i,]" % (run+1))
#Now if needed, get the slice into python:
slice = rpy("r")
#etc
Peter
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list