2008/4/1, Peter <[EMAIL PROTECTED]>: > Hi Lukasz, > > If your data has all the elements of the same type, then you could try > loading it into a NumPy matrix or array, and passing that to R. > > I personally would pass the filename to R, and use R's read.table() > command to load it in R. You can work out the exact options you need > for read.table() by experimenting in an R session, and then try the > same from rpy. This assumes you do not need the actual data in python > too. > > I don't know if you can pass the file pointer (handle) from python to > R. I would be interested to know if this is possible.
It would only be possible by going down to the C level, I think. However, I am not certain the use-cases for having so are common. (feel free to share them if you have some and want to discuss them) L. > > Peter > > > On Tue, Apr 1, 2008 at 2:51 AM, Lukasz Szybalski <[EMAIL PROTECTED]> wrote: > > Hello, > > I am trying to read a 100mb+ csv file in python. > > f=csv.DictReader(open(filename)) > > or > > f=csv.Reader(open(filename)) > > > > When I read it in I would like to pass it to R to do some work on it. > > How would I do that? > > > > Do I pass the file pointer or read file? > > I think for speed purposes I would prefer passing read file. > > > > Lucas > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list