You should be able to use something like:

> from rpy import *
> set_default_mode(NO_CONVERSION)
> d = r.data_frame(a=(1,2,3), b=(71,72,73))
> getRow = r("function(d, i) d[i,,drop=FALSE]")
> r1 = getRow(d,1)

-Greg

On Jan 4, 2007, at 5:28 PM, BORGULYA Gábor wrote:

> Dear All,
>
> Could someone tell how to get the Nth row of a data_frame in Rpy?
> The R version works, but I dont know what to write in Rpy:
>
> R VERSION
>
>> d = data.frame(a=c(1,2,3), b=c(71,72,73))
>> r1 = d[1, ]
>> r1
>   a  b
> 1 1 71
>
>
> RPY VERSION
>
> from rpy import *
> set_default_mode(NO_CONVERSION)
> d = r.data_frame(a=(1,2,3), b=(71,72,73))
> r1 = ????????
>
>
> Gábor
>
> ---------------------------------------------------------------------- 
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to  
> share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php? 
> page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to