From: Laurent G. <lga...@gm...> - 2011-01-17 06:38:47
|
On 1/17/11 12:25 AM, Carson Farmer wrote: (...) >>>> dataf2 = dataf.rx(-2) > Which works fine, and produces a new data.frame as output >>>> print dataf2 > a > 1 1 > 2 2 > 3 3 > However, if I now wanted to remove the last row for instance: >>>> dataf3 = dataf2.rx(-3, True) >>>> print dataf3 > [1] 1 2 > I no longer get a data.frame, but instead, I get an IntVector object. That's R's default to "drop" dimensions. dataf3 = dataf2.rx(-3, True, drop = False) Should return you a data.frame. I have wondered whether I should make drop = False the default. (...) > > Rpy2 version 2.1.4 Latest in 2.1.x is 2.1.9. > R version 2.12.1 (2010-12-16) > Platform: x86_64-pc-linux-gnu (64-bit) > Best, L. > Cheers, > > Carson > > |