No subject


Mon Jun 6 11:45:04 CEST 2011


loaded by rpy2 anyway in order to work at all, or am I totally wrong here?

Running python 2.7.1, rpy2-2.2.2, R 2.13.0
I would appreciate any help.

Regards,
Jonas

--0016363b81c479eaea04aa4e1fa1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Dirk and Romain,<br><br>Aparrently libR is not loaded by rpy2, at least =
not in a way such that Rcpp can access it. I have solved the problem by add=
ing -lR to the linker flags when building Rcpp. Since for normal use of Rcp=
p from R this does not make a difference, would you mind adding this to the=
 Makevars file in a future version of Rcpp? Or does this lead to problems i=
n case R is build without libR.so?<br>

<br>Best regards,<br>Jonas<br><br><div class=3D"gmail_quote">---------- For=
warded message ----------<br>From: <b class=3D"gmail_sendername">Jonas Rauc=
h</b> <span dir=3D"ltr">&lt;<a href=3D"mailto:jonas.rauch at googlemail.com">j=
onas.rauch at googlemail.com</a>&gt;</span><br>

Date: Fri, Aug 12, 2011 at 10:36 AM<br>Subject: Rcpp and rpy2<br>To: rcpp-d=
evel &lt;<a href=3D"mailto:rcpp-devel at r-forge.wu-wien.ac.at">rcpp-devel at r-f=
orge.wu-wien.ac.at</a>&gt;<br><br><br>Is Rcpp compatible with rpy2?<br>I wo=
uld like to call a very complex R function from python. My function depends=
 on code implemented with Rcpp. When I try to load Rcpp from python via<br>

<br>import rpy2.robjects as robjects<br>
robjects.r(&#39;library(Rcpp)&#39;)<br><br>I get the following:<br><br>Erro=
r in dyn.load(file, DLLpath =3D DLLpath, ...) : <br>=A0 unable to load shar=
ed object &#39;/home/jonas/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/lib=
s/Rcpp.so&#39;:<br>


=A0 /home/jonas/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/libs/Rcpp.so: =
undefined symbol: R_ClassSymbol<br>Error: package/namespace load failed for=
 &#39;Rcpp&#39;<br>Traceback (most recent call last):<br>=A0 File &quot;Rcp=
pTest.py&quot;, line 2, in &lt;module&gt;<br>


=A0=A0=A0 robjects.r(&#39;library(Rcpp)&#39;)<br>=A0 File &quot;/usr/local/=
lib/python2.7/dist-packages/rpy2-2.2.2dev_20110811-py2.7-linux-x86_64.egg/r=
py2/robjects/__init__.py&quot;, line 225, in __call__<br>=A0=A0=A0 res =3D =
self.eval(p)<br>


=A0 File &quot;/usr/local/lib/python2.7/dist-packages/rpy2-2.2.2dev_2011081=
1-py2.7-linux-x86_64.egg/rpy2/robjects/functions.py&quot;, line 82, in __ca=
ll__<br>=A0=A0=A0 return super(SignatureTranslatedFunction, self).__call__(=
*args, **kwargs)<br>


=A0 File &quot;/usr/local/lib/python2.7/dist-packages/rpy2-2.2.2dev_2011081=
1-py2.7-linux-x86_64.egg/rpy2/robjects/functions.py&quot;, line 34, in __ca=
ll__<br>=A0=A0=A0 res =3D super(Function, self).__call__(*new_args, **new_k=
wargs)<br>


rpy2.rinterface.RRuntimeError: Error: package/namespace load failed for &#3=
9;Rcpp&#39;<br><br>From what I understand R_ClassSymbol is supplied by libR=
.so, which should by loaded by rpy2 anyway in order to work at all, or am I=
 totally wrong here?<br>


<br>Running python 2.7.1, rpy2-2.2.2, R 2.13.0<br>I would appreciate any he=
lp.<br><br>Regards,<br><font color=3D"#888888">Jonas<br>
</font></div><br>

--0016363b81c479eaea04aa4e1fa1--


More information about the Rcpp-devel mailing list