Tom
Hi.
> i want to use R with Python and Cairo. I have the following problem:
>
> ####################
> # Python
> ####################
>>>> from rpy2 import robjects
>>>> robjects.r('library(Cairo)')
> Error in library(Cairo) : es gibt kein Paket 'Cairo'
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/usr/lib/python2.6/dist-packages/rpy2/robjects/__init__.py",
> line 535, in __call__
>    res = self.eval(p)
>  File "/usr/lib/python2.6/dist-packages/rpy2/robjects/__init__.py",
> line 422, in __call__
>    res = super(RFunction, self).__call__(*new_args, **new_kwargs)
> rinterface.RRuntimeError: Error in library(Cairo) : es gibt kein Paket
> 'Cairo'
>
> ####################
> # R
> ####################
>> library(Cairo)
>>
>
>
>
> Can anybody help with this problem? My future plan is to use Python+R
> +Django to produce nice graphs with R and display the graphs within a
> website.

A question:
Why are you loading Cairo from within R (Obviously assuming R has
interface to Cairo ;-)

http://cairographics.org/pycairo/ is python binding to Cairo graphics
from _within_ Python (I'd use that if I had a choice)

I'd would try n use Rpy2/Rpy only for R-related functions/algorithms
and try to separate them. Once the calculations are done by
Rpy/Rpy2/R, then use PyCairo to display the results _in_ Python.

Regarding Django interfacing another way is to use Protovis
(http://vis.stanford.edu/protovis)  to display the calculations from
Rpy2 (at the presentation/HTML layer) using Django templates.

HTH.
-- 
Regards,
Ishwor Gurung

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to