<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; ">That exposes the data3 class, but does not solve the pointer problem.</span><br>
<br><div class="gmail_quote">On Thu, Dec 2, 2010 at 12:24 PM, Romain Francois <span dir="ltr">&lt;<a href="mailto:romain@r-enthusiasts.com">romain@r-enthusiasts.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Le 02/12/10 20:05, Andrew Redd a écrit :<div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I updated to the new Rcpp 0.8.9 then added a new function to my class.<br>
  It compiles fine the Module is found and loads the class definition<br>
seems to be there, but when I try to create a instance of the class I<br>
get the error:<br>
<br>
R&gt; new(Module(&quot;GPU_BAYES&quot;,&#39;gpuBayes&#39;)$data3)<br>
Error in get(&quot;.pointer&quot;, envir = env) : object &#39;.pointer&#39; not found<br>
<br>
Any Ideas what might be wrong here?  That&#39;s a rather vague error.  The<br>
traceback gives<br>
<br>
 &gt; traceback()<br>
3: get(&quot;.pointer&quot;, envir = env)<br>
2: function (object)<br>
    standardGeneric(&quot;show&quot;)(&lt;S4 object of class &quot;Rcpp_data3&quot;&gt;)<br>
1: function (object)<br>
    standardGeneric(&quot;show&quot;)(&lt;S4 object of class &quot;Rcpp_data3&quot;&gt;)<br>
<br>
<br>
Thanks,<br>
Andrew<br>
</blockquote>
<br></div></div>
In the Rcpp-modules vignette, that has been considerably updated in the last version of Rcpp (part of the 8661 new lines of code), we suggest to have this in your .onLoad:<br>
<br>
# grab the namespace<br>
NAMESPACE &lt;- environment()<br>
<br>
.onLoad &lt;- function(libname, pkgname){<br>
        # load the module and store it in our namespace<br>
        yada &lt;- Module( &quot;GPU_BAYES&quot; )<br>
        populate( yada, NAMESPACE  )<br>
}<br>
<br>
and the &quot;data3&quot; class is directly exposed in the namespace of your package, so that you can do:<br>
<br>
new( data3 )<br>
<br>
Does that work ?<br>
<br>
<br>
Otherwise, maybe you can try adding mustStart = TRUE to the call to Module.<br>
<br>
-- <br>
Romain Francois<br>
Professional R Enthusiast<br>
+33(0) 6 28 91 30 30<br>
<a href="http://romainfrancois.blog.free.fr" target="_blank">http://romainfrancois.blog.free.fr</a><br>
|- <a href="http://bit.ly/hovakS" target="_blank">http://bit.ly/hovakS</a> : RcppGSL initial release<br>
|- <a href="http://bit.ly/iaxTdO" target="_blank">http://bit.ly/iaxTdO</a> : parser 0.0-12<br>
`- <a href="http://bit.ly/gnCl01" target="_blank">http://bit.ly/gnCl01</a> : Rcpp 0.8.9<br>
<br>
<br>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
</blockquote></div><br>