Re: [Rpy] Adding columns to DataFrames

2012-08-21 Thread Carlos Pita
(s/mm/newcol/ in the error message above) On Tue, Aug 21, 2012 at 2:25 PM, Carlos Pita wrote: > Mh, this is interesting: > > dataf = r['[<-'](dataf, 'newcol', R.IntVector([1,2,3])) > > => Error in `[<-.data.frame`(list(a = 1:3, b = 4:6, mm = 1:3), "mm", 1:3) : > argument "value" is missin

Re: [Rpy] Adding columns to DataFrames

2012-08-21 Thread Carlos Pita
Mh, this is interesting: dataf = r['[<-'](dataf, 'newcol', R.IntVector([1,2,3])) => Error in `[<-.data.frame`(list(a = 1:3, b = 4:6, mm = 1:3), "mm", 1:3) : argument "value" is missing, with no default (Same for '[[<-') dataf = r['$<-'](dataf, 'newcol', R.IntVector([1,2,3])) => OK I t

Re: [Rpy] Adding columns to DataFrames

2012-08-21 Thread Carlos Pita
Hi all, >>empty.rx2["New"] = [str(item) for item in range(len(empty.rownames))] >> RRuntimeError: Error in `[[<-.data.frame`(list(), "New", list("0", "1", >> "2", "3", "4", : argument "value" is missing, with no default >> Anything I'm doing wrong? > Not necessarily; I think

Re: [Rpy] Adding columns to DataFrames

2012-02-28 Thread Laurent Gautier
On 2012-02-24 09:55, Luca Beltrame wrote: Hello, in an effort to create a conversion between pandas objects[1] and R's data.frames, This would be handy. A common interface ("protocol" in the Python lingo) would allow duck typing. I'm trying to add columns to an empty DataFrame. Python c