'FALSE' is a string, which somehow when converted to a boolean evaluates as True.
How do you like: >>> kwargs={'df':25,'lower.tail':False} >>> print ro.r['qt'](0.05, **kwargs) [1] 1.708141 2009/2/4 Lindsey Bangay <l.ban...@ru.ac.za>: > HI > > I am new to rpy2, but I would appreciate some assistance on this problem > > I want to calculate the quantile of the t-distribution, using the upper tail: >>>>import rpy2.robjects as ro >>>>kwargs={'df':25,'lower.tail':'FALSE'} >>>>print ro.r['qt'](0.05, **kwargs) > > but this is what I get : > > Warning message: > > In function (p, df, ncp, lower.tail = TRUE, log.p = FALSE) : > NAs introduced by coercion > > [1] -1.708141 > > I am using the latest rpy2, R version 2.8.1 (2008-12-22) > and python2.6 > > Any help or insight, particularly if it is simple finger trouble on my part, > appreciated. > > I do realise that I can easily workaround this to get what I want from this > answer, but I do not understand why it is not producing the expected answer > that I would get in R, as in >> qt(p=0.05, df=25,lower.tail=FALSE) > [1] 1.708141 > > > Thanks > Lindsey > -- > Lindsey Bangay > Dept of Statistics, Rhodes University, Grahamstown > South Africa > +27 46 6038347 (work) > +27 46 6222723 (fax) > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list > ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list