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
>
>


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to