Re: [Rcpp-devel] Rcpp.package.skeleton testmod

2013-06-03 Thread Dirk Eddelbuettel
On 3 June 2013 at 19:31, Andreas Prescher wrote: | Hello, | | Any help would be greatly | appreciated | | I am trying to use the example | testmod package by using: | | Rcpp.package.skeleton( "testmod", module = TRUE ) | and: | R CMD INSTALL testmod | | system information: | R version 3.0

Re: [Rcpp-devel] Rcpp.package.skeleton testmod

2013-06-03 Thread Romain Francois
This might be a documentation issue on our side, but you don't need to call Module. The code that is generated loads the module directly when teh package is loaded: > require( testmod ) Le chargement a nécessité le package : testmod Le chargement a nécessité le package : Rcpp > hello() Erreur :

[Rcpp-devel] Rcpp.package.skeleton testmod

2013-06-03 Thread Andreas Prescher
Hello, Any help would be greatly appreciated I am trying to use the example testmod package by using: Rcpp.package.skeleton( "testmod", module = TRUE ) and: R CMD INSTALL testmod system information: R version 3.0.1 (2013-05-16) Platform: x86_64-pc-linux-gnu (64-bit), ubuntu 12.04 LTS /usr

Re: [Rcpp-devel] Conversion of Rcpp::Vector Rcpp::List and Rcpp::Matrix to std objects - OpenMP

2013-06-03 Thread Asis Hallab
Dear Dirk, Simon and Rcpp Experts. This is a message following up the thread about using OpenMP directives with Rcpp to construct probability matrices in parallel. I send it again to properly close this thread (for now…) I followed Dirk's hint and implemented the parallel matrix generation using

Re: [Rcpp-devel] Conversion of Rcpp::Vector Rcpp::List and Rcpp::Matrix to std objects - OpenMP

2013-06-03 Thread Simon Zehnder
Hi Asis, parallel computing is a very delicate task in programming, which depends on one side on your hardware architecture and on the other side on your commands in your software. 1. If a sequential code is faster than the parallel code, check if something is differently programmed or, if a

Re: [Rcpp-devel] When to use SEXP as return value or argument type?

2013-06-03 Thread Dirk Eddelbuettel
On 3 June 2013 at 14:35, Asis Hallab wrote: | Dear Rcpp Experts, | | two simple and short questions: | | Do I always have to use SEXP arguments, if I want the method to be | callable from R through the .Call( … ) function? Yes. There is only one interface: .Call(), returning SEXP and taking zer

[Rcpp-devel] When to use SEXP as return value or argument type?

2013-06-03 Thread Asis Hallab
Dear Rcpp Experts, two simple and short questions: Do I always have to use SEXP arguments, if I want the method to be callable from R through the .Call( … ) function? Does the return type have to be a SEXP, too, or can I use any Rcpp class instead? Kind regards!

Re: [Rcpp-devel] Conversion of Rcpp::Vector Rcpp::List and Rcpp::Matrix to std objects - OpenMP

2013-06-03 Thread Asis Hallab
Dear Dirk, Simon and Rcpp Experts. This is a message following up the thread about using OpenMP directives with Rcpp to construct probability matrices in parallel. I followed Dirk's hint and implemented the parallel matrix generation using just C++'s STL and the "#pragma omp parallel for" for the