[Rcpp-devel] R Embedded in a class function
CESAR PERNALETE
pernaletec at pdvsa.com
Mon Mar 21 16:53:53 CET 2011
Hi Davor, Dirk.
Thanks a lot for your help. I tried the way Dirk are suggesting and it
appears to work fine. The application at all is not working yet, i don't
know exactly
what is happening, so i did a consultation to the NOMAD developer. But i
believe that the problem of using the R object into a method is solved.
Please, find attached a simplified example of the code.
If you see something weird, please don't hesitate in writing to the list.
Best regards.
César
Davor Cubranic <cubranic at stat.ubc.ca>
Enviado por: rcpp-devel-bounces at r-forge.wu-wien.ac.at
17/03/2011 07:51 p.m.
Para
Dirk Eddelbuettel <edd at debian.org>
cc
rcpp-devel at r-forge.wu-wien.ac.at
Asunto
Re: [Rcpp-devel] R Embedded in a class function
On 2011-03-17, at 3:31 PM, Dirk Eddelbuettel wrote:
> | And it so happens that I just wrote an example of instantiating
RInside and
> | passing to Qt so that you'd get 'R inside Qt'. That is now in SVN for
> | RInside but I haven't even gotten around to writing a short blog post
about
> | it. Maybe on the weekend...
>
> I forgot to give the URL:
>
>
https://r-forge.r-project.org/scm/viewvc.php/pkg/inst/examples/qt/?root=rinside
>
But your code still creates R instance in "main", which it then passes to
the QtDensity instance (a subclass of QtMainWindow). OTOH, once the R
instance is stored as a member variable of QtDensity, it *is* used in
QtDensity's methods.
But I'm quibbling -- it's a good pattern to follow, so Cesar could perhaps
just adapt it to his code.
Davor
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110321/40f19c69/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: embedRinAmethodv2.cpp
Type: application/octet-stream
Size: 3843 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110321/40f19c69/attachment.obj>
More information about the Rcpp-devel
mailing list