I made significant progress this morning on using RPy. I was having trouble calling a function from the
ape
package in R. The problem was simply a matter of namespaces, or "environments" as R calls them (I know they're more complex than that but ..).So if I want the function
read.tree
, I have to specify it's from ape
and also the syntax is different (standard call first, ape call second):The second thing is that I would normally call
plot
with a tree and an argument tip.color= ..
. Instead of doing that, what worked for me is to call the specific plot function from
ape
:Next up, trying not to deal with the plotting window. RPy is set up to use X11, and it doesn't look so hot. So, I'd like to save the plots as pdf files. I found the instructions here:
The other issue I really haven't solved is RPy crashing. Or rather, I can't reproduce it with Python 2.6.6 installed. I did this by building it with debug enabled (That's where the lines like
[57936 refs]
are coming from in the output above. But that's another story.