On Fri, Sep 11, 2009 at 5:18 PM, Nick Schurch <n.schu...@dundee.ac.uk> wrote: > Dear Rpythoners, > > I'm having a problem using an R package called 'pvclust' from python. I have > rpy installed and things look like they are fine. The pvclust package loads > fine with r.library('pvclust'), but when I do the following command: > > r.pvclust(data, method.hclust="complete", method.dist="correlation", > nboot=100)
Try: r.pvclust(data, method.hclust="complete", method_dist="correlation", nboot=100) > I get the following error message: > > SyntaxError: keyword can't be an expression > > I had a ferret around on the web and found a similar problem to this on this > list previously, but the answer (which in this case would translate to: > "'hclust' is an attribute of the object 'method'") is completely greek to > me. In Python, the dot means access a method/property of an object. In R, a dot is just another character in a variable or function name. Thus rpy maps "_" to "." to allow simple access to these otherwise invalid R names from within Python. This is in the documentation ;) Peter ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list