Hi Jan! I had similar problems with this demo:
Here're my solutions:
On working through the faithful.py demo at:
http://rpy.sourceforge.net/rpy_demo.html.
If one does the following:
1> copy the demo verbatim into a file on my system
2> prepend #! /usr/bin/env python to it
3> place the .dat file in an appropriate location
4> and run faithful.py
then the following error(s) occur:
"""
None
Warning message:
package 'stepfun' has been merged into 'stats'
Traceback (most recent call last):
File "./faithful.py", line 36, in ?
main="Empirical cumulative distribution function of Old Faithful
eruptions longer than 3 seconds")
rpy.RException: Error in plot.stepfun(x, ..., ylab = ylab, verticals =
verticals) :
argument 3 matches multiple formal arguments
"""
My fix:
1> update the r.library('stepfun') line to r.library('stats')
2> remove the `, col="blue",` argument from the "r.plot(r.ecdf...." call,
and
3> remove the r.library('ctest') line
then the example runs without errors.
It seems like this example is an important showcase for rpy, so we should
probably update it!
--Josh Wilcox
On 7/27/07, Jan Groenewald <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I have this on Ubuntu Feisty 7.04:
>
> ii python 2.5.1-0ubuntu3 An interactive high-level
> object-oriented la
> ii python-rpy 1.0~rc1-5 Python interface to the GNU R language
> and e
> ii r-base 2.4.1-1 GNU R statistical computing language and
> env
>
> I try to run the demo from http://rpy.sourceforge.net/rpy_demo.html
> in ipython, but it chokes on the second plot, perhaps due to stepfun
> moving into stats?
>
> In [1]:run faithful.py
> RHOME= /usr/lib/R
> RVERSION= 2.4.1
> RVER= 2041
> RUSER= /home/jan
> Loading Rpy version 2041 .. Done.
> Creating the R object 'r' .. Done
> Summary of Old Faithful eruption duration data
> Min.: 1.600
> 1st Qu.: 2.163
> 3rd Qu.: 4.454
> Median: 4.000
> Max.: 5.100
> Mean: 3.488
>
> Stem-and-leaf plot of Old Faithful eruption duration data
>
> The decimal point is 1 digit(s) to the left of the |
>
> 16 | 070355555588
> 18 | 000022233333335577777777888822335777888
> 20 | 00002223378800035778
> 22 | 0002335578023578
> 24 | 00228
> 26 | 23
> 28 | 080
> 30 | 7
> 32 | 2337
> 34 | 250077
> 36 | 0000823577
> 38 | 2333335582225577
> 40 | 0000003357788888002233555577778
> 42 | 03335555778800233333555577778
> 44 | 02222335557780000000023333357778888
> 46 | 0000233357700000023578
> 48 | 00000022335800333
> 50 | 0370
>
> None
> Warning message:
> package 'stepfun' has been merged into 'stats'
>
> ---------------------------------------------------------------------------
> <class 'rpy.RException'> Traceback (most recent call
> last)
>
> /var/autofs/misc/home/jan/tmp/rpy/faithful.py in <module>()
> 33 r.library('stepfun')
> 34 r.plot(r.ecdf(long_ed), do_points=0, verticals=1, col="blue",
> ---> 35 main="Empirical cumulative distribution function of Old
> Faithful eruptions longer than 3 seconds")
> 36 x = r.seq(3,5.4,0.01)
> 37 r.lines(r.seq(3,5.4,0.01),r.pnorm(r.seq(3,5.4,0.01),mean=r.mean
> (long_ed),
>
> <class 'rpy.RException'>: Error in plot.stepfun(x, ..., ylab = ylab,
> verticals = verticals) :
> argument 3 matches multiple formal arguments
>
> WARNING: Failure executing file: <faithful.py>
>
> In [2]:
>
> regards,
> Jan
> --
> .~.
> /V\ Jan Groenewald
> /( )\ www.aims.ac.za
> ^^-^^
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list