Re: [Rpy] read csv in python, and pass it on to R?

2008-04-01 Thread Laurent Gautier
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

Re: [Rpy] read csv in python, and pass it on to R?

2008-04-01 Thread Gregory Warnes
You can pass the read data directly to R. Probably the best way to do this is to construct a python list containing one vector per column. Call as.data.frame() on the list, and then proceed. For example: from rpy import * set_default_mode(NO_CONVERSION) data = [ [

Re: [Rpy] read csv in python, and pass it on to R?

2008-04-01 Thread Peter
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.tabl