[Rpy] about the dim() function

2006-11-22 Thread Christian Jauvin
Hello, I am new to RPy, and I have a hard time trying to use a R function thats needs the number of dimensions of a data.frame I am passing it. Here is an example: from rpy import * x = r.data_frame(x=r.c(1,3), y=r.c(2,4)) At this point, why doesn't r.dim(x) returns something like it

Re: [Rpy] about the dim() function

2006-11-22 Thread Toby Hocking
Hi there Christian, I find it's easiest to use rpy if you minimize the number of data conversion steps you need. That is, write most of your code in R, wrap it in my.function, then call it from python via r.source("my.source.file.R") r.my_function(args) Rather than constructing a data frame in