Now I understand, Laurent, thank you. I was using plot() in the 2.2.5 version and the import of ggplot2 was not working, so I changed it and made it even worse. Going back to the ggplot2 import, it now works with 2.2.6, as expected.
Thank you. Roger On Mon, Jul 9, 2012 at 3:29 PM, Laurent Gautier <lgaut...@gmail.com> wrote: > I am reading your code snippet, and that will not work. > The convenience method "plot" is part of a custom wrapping of ggplot2. > > > http://rpy.sourceforge.net/rpy2/doc-dev/html/graphics.html?highlight=ggplot2#rpy2.robjects.lib.ggplot2 > > > Using importr() means that you will use the ggplot2 library are > represented > in R. > > > L. > > > > > > > On 2012-07-09 15:03, Roger Guimera wrote: >> >> I've tried with both 2.2.5 and 2.2.6 and I get the same error >> >> Roger >> >> On Mon, Jul 9, 2012 at 2:58 PM, Laurent Gautier <lgaut...@gmail.com> >> wrote: >>> >>> Hi Roger, >>> >>> rpy2-2.2.6 fixed issues related to using the latest release of ggplot2. >>> Is this the version you are using ? >>> >>> >>> Best, >>> >>> Laurent >>> >>> >>> >>> On 2012-07-09 14:51, Roger Guimera wrote: >>>> >>>> Hi, >>>> >>>> I am trying to use rpy2 to generate ggplot2 graphs, but I encounter >>>> the same problem with all the examples in >>>> >>>> >>>> http://rpy.sourceforge.net/rpy2/doc-2.2/html/graphics.html#package-ggplot2 >>>> . For example, if I try to run this example: >>>> >>>> from rpy2.robjects.packages import importr >>>> datasets = importr("datasets") >>>> r_ggplot2 = importr("ggplot2") >>>> p = r_ggplot2.qplot('mpg', 'wt', data = datasets.mtcars) >>>> p.plot() >>>> >>>> I get the following error: >>>> >>>> Traceback (most recent call last): >>>> File "test.py", line 5, in <module> >>>> p.plot() >>>> AttributeError: 'ListVector' object has no attribute 'plot' >>>> >>>> I am using R 2.15.1, Python 2.7.3 and ggplot2 0.9.1. Does anyone have >>>> any idea what's going on? >>>> >>>> Thanks in advance. >>>> >>>> Roger >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. >>>> Discussions >>>> will include endpoint security, mobile security and the latest in >>>> malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> rpy-list mailing list >>>> rpy-list@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/rpy-list >>> >>> >>> >> >> > > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list