[IPython-user] rpy.princomp missing when using ipython

Fernando Perez fperez.net@gmail....
Tue Jun 10 13:08:38 CDT 2008

On Tue, Jun 10, 2008 at 10:36 AM, Stefan Vey <stefan.vey@pi.tu-berlin.de> wrote:
> Hi!
> I'm new to python and have a question/problem.
> I am using IPython 0.8.1 (installed from repositories) on Kubuntu 7.10. When I
> import rpy in ipython, I cannot access the rpy.princomp function to perform
> principal component analyses. And why do I have to use "rpy." instead of "r."
> which works in plain python console? This problem only exists when I use
> Ipython, everything is fine in the standard python shell, so I guess the
> problem is in Ipython.
> hoping for help

Please post the *actual* session transcript that you are running
successfully in the plain python console, so we can reproduce it here.
 I'm  not an R user so I don't know where princomp is, but it doesn't
appear to be at the top-level:

>>> import rpy
>>> import rpy.princomp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named princomp
>>> rpy.princomp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'princomp'



More information about the IPython-user mailing list