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 t
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.dat