Peter wrote:
> On Mon, Nov 23, 2009 at 1:57 PM, B.A.D.C.M.D Santos <bac...@cam.ac.uk> wrote:
>> This is probably just a stupid problem but for some reason I can't find a
>> solution anywhere.
>>
>> I am trying to use phyper from R using rpy2. The problem is that when I try
>> to run the following code: [code] self.phyper = robjects.r('phyper') ' ' '
>> nPvalue=1-self.phyper(k,21,440,n,lower_tail=False)[0] [/code]
>>
>> I get an error:
>> Error in function (q, m, n, k, lower.tail = TRUE, log.p = FALSE)  :
>>  unused argument(s) (lower_tail = FALSE)
>>
>> Can someone tell what am I doing wrong?
> 
> I think the issue is that while rpy1 would automatically turn an
> argument name like lower_tail=False into lower.tail=FALSE,
> this doesn't happen in rpy2. Part of the issue is that the R
> language does (nowadays) allow both dots and underscores
> in variable names and argument names, so this mapping isn't
> 100% safe.

rpy2-2.1dev is addressing this.

> I expect an rpy2 expert will clarify how you are intended to
> do this, otherwise consult the docs.

Yes.
http://rpy.sourceforge.net/rpy2/doc/html/robjects.html#functions


> 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


------------------------------------------------------------------------------
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

Reply via email to