Hello all,

I'm new of Python and RPy, and I'm creating a plugin for QGIS that calls R to
perform ecological analyses [1].
I'm developing the plugin on a Ubuntu 64bit machine, with RPy 1.0.1, R 2.6.0 and
Python 2.5.
I'm experiencing some problems when translating R code into RPy.
The R code is the following:

out <- f(dataframe, method="mcp")
g(out, another_dataframe, export="all")

where f and g are two custom functions I've sourced correctly into the plugin.

The first dataframe is a Python dictionary that I passed to R with NO_CONVERSION
mode. This mode is set at the beginning of the piece of code that calls R. 

This is my Python translation:

out = r.f(dataframe, method="mcp")

The problem arises when the output of f() comes back to Python, and loses its
structure.
It should be a list of lists, but r.is_(out) returns
[function, OptionFunction, PossibleMethod]
and r.str(out) returns a memory address (r.str(dataframe) returns its structure
even in no conversion mode, so I expected r.str(out) to do the same)

Any suggestion is welcome!

regards,

Anne Ghisla

[1] http://wiki.qgis.org/qgiswiki/GSoC2008Rbinding




-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to