Hello,

Its doesn't look like the message posted by Peter Sudmant on April 21st hasn't gotten a reply yet and I'm noticing the same problem with creating a dataframe and plotting it with ggplot. With python 2.6.5, rpy2 2.1.1 and R 2.11.0, I try the following from the documentation:

--
import rpy2.robjects.lib.ggplot2 as ggplot2
import rpy2.robjects as ro
d = {'a': ro.IntVector((1,2,3)), 'b': ro.IntVector((4,5,6))}
dataf = ro.DataFrame(d)
gp = ggplot2.ggplot(dataf)

pp = gp + ggplot2.geom_point()
pp.plot()
--

and get the following:

--
Error: attempt to apply non-function
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/rpy2/robjects/lib/ggplot2.py", line 32, in plot
    self._rprint(self, vp = vp)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/rpy2/robjects/functions.py", line 83, in __call__ return super(SignatureTranslatedFunction, self).__call__(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/rpy2/robjects/functions.py", line 35, in __call__
    res = super(Function, self).__call__(*new_args, **new_kwargs)
rpy2.rinterface.RRuntimeError: Error: attempt to apply non-function
--

I can type "print dataf" and the data frame prints fine. Also, loading the "mtcars" dataframe example mentioned in the documentation works fine. Any suggestions?

Thanks

Jeremy

--
Jeremy Van Cleve

Omidyar Postdoctoral Fellow
Santa Fe Institute
E-mail: vancl...@santafe.edu    
Webpage: http://www.santafe.edu/~vancleve/

------------------------------------------------------------------------------

_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to