Re: [Rcpp-devel] Error in Module

2014-04-08 Thread Brötje David
Thanks for your answers. Now it works both as package and with sourceCpp. David ___ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] Error in Module

2014-04-08 Thread Romain François
Hello, Just sourceCpp the .cpp file and use the functions verbatim: > sourceCpp( "/tmp/mod.cpp" ) > bar(2L) [1] 4 If you really want to use the module as an object, you have to pick it up from the right spot: > yada <- Module("yada", where = tail(getLoadedDLLs(), 1)[[1]] ) > yada$hello() [

Re: [Rcpp-devel] Error in Module

2014-04-08 Thread Dirk Eddelbuettel
On 8 April 2014 at 09:00, Brötje David wrote: | This happens all the time with modules. Did I overlook something or | what am I doing wrong? This may not work from command-line use. Our vignette and other documentation stresses use in a package. Please consider that. Your example is pretty th

[Rcpp-devel] Error in Module

2014-04-08 Thread Brötje David
Hello, I want to expose a C++ class to R through Rcpp. For that I want to try out a few examples from the note "Exposing C++ functions and classes with Rcpp modules" and the book "Seamless R and C++ Integration with Rpp". But I can't manage to get them work. It ends up with an error. So this