Re: [Rcpp-devel] Using Rcpp in MS VC++

2010-05-27 Thread Dirk Eddelbuettel
On 27 May 2010 at 22:37, R_help Help wrote: | Hi - I tried to start using Rcpp in MS VC++. As expected, with my | experience I can't get it to work. The compiled Rcpp.dll was compiled | with MinGW and the mangled name convention seem to be totally | different from MS VC++ convention. I also tried

[Rcpp-devel] Using Rcpp in MS VC++

2010-05-27 Thread R_help Help
Hi - I tried to start using Rcpp in MS VC++. As expected, with my experience I can't get it to work. The compiled Rcpp.dll was compiled with MinGW and the mangled name convention seem to be totally different from MS VC++ convention. I also tried compiling the source within VC++ myself. However, I h

Re: [Rcpp-devel] Rcpp modules take 3, now with a vignette

2010-05-27 Thread Davor Cubranic
That's pretty cool. It's good to know it should be doable -- I'll give it a whack, once (if) I graduate to that level of expertise with template meta-programming and R internals. Davor On 2010-05-27, at 12:36 PM, Romain Francois wrote: > Davor, > > Rcpp modules currently does not handle enum

Re: [Rcpp-devel] Rcpp modules take 3, now with a vignette

2010-05-27 Thread Romain Francois
Davor, Rcpp modules currently does not handle enum types, but Boost.Python does, so I suppose we could have similar syntax. http://www.boost.org/doc/libs/1_43_0/libs/python/doc/v2/enum.html This is not high on my priority list, but if you want to prepare some patch, I'll look into it. Roma

Re: [Rcpp-devel] RcppArmadillo questions

2010-05-27 Thread Romain Francois
Le 27/05/10 17:24, Vinh Nguyen a écrit : Two questions: 1. The main difference when using RcppArmadillo and Rcpp is the header declaration and the return type for the function right? extern "C" SEXP fastLm(SEXP ys, SEXP Xs) {} RcppArmadillo takes this extern stuff whereas Rcpp takes RcppExpor

Re: [Rcpp-devel] Rcpp modules take 3, now with a vignette

2010-05-27 Thread Davor Cubranic
Hi Romain, Can you tell me if this mechanism can somehow be used for passing enum-type arguments from R to Rcpp? I'm currently using strings or integers, and hope there can be an easier way to keep the two sides of the code from getting out of sync. Davor On 2010-05-27, at 2:35 AM, Romain Fr

Re: [Rcpp-devel] RcppArmadillo questions

2010-05-27 Thread Douglas Bates
On Thu, May 27, 2010 at 11:24 AM, Vinh Nguyen wrote: > Two questions: > > 1.  The main difference when using RcppArmadillo and Rcpp is the > header declaration and the return type for the function right? > extern "C" SEXP fastLm(SEXP ys, SEXP Xs) {} > RcppArmadillo takes this extern stuff whereas

Re: [Rcpp-devel] basic usage help

2010-05-27 Thread Dirk Eddelbuettel
On 27 May 2010 at 08:19, Vinh Nguyen wrote: | My next question is: if I have both .c and .cpp files in ./src/ is | made from RcppArmadillo's skeleton function is OK right? I never | understood the stuff about libraries and headers so I never know | what's going on under the hood. I just tried bu

[Rcpp-devel] RcppArmadillo questions

2010-05-27 Thread Vinh Nguyen
Two questions: 1. The main difference when using RcppArmadillo and Rcpp is the header declaration and the return type for the function right? extern "C" SEXP fastLm(SEXP ys, SEXP Xs) {} RcppArmadillo takes this extern stuff whereas Rcpp takes RcppExport? RcppExport SEXP newRcppVectorExample(SEXP

Re: [Rcpp-devel] basic usage help

2010-05-27 Thread Vinh Nguyen
My next question is: if I have both .c and .cpp files in ./src/ is made from RcppArmadillo's skeleton function is OK right? I never understood the stuff about libraries and headers so I never know what's going on under the hood. I just tried building a package with both kinds of files and the pac

Re: [Rcpp-devel] basic usage help

2010-05-27 Thread Dirk Eddelbuettel
On 27 May 2010 at 08:05, Vinh Nguyen wrote: | On Wed, May 26, 2010 at 11:33 PM, Romain Francois | wrote: | > If you don't want to use what R and Rcpp provides for you, you can emulate | > this by using this Makevars : | > | > PKG_LIBS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()" ) | > $(

Re: [Rcpp-devel] basic usage help

2010-05-27 Thread Vinh Nguyen
On Wed, May 26, 2010 at 11:33 PM, Romain Francois wrote: > You don't have to, but it makes your life easier. Now that we use LinkingTo: > Rcpp, RcppArmadillo it makes our Makevars smaller and more robust. R figures > out on its own where to find Rcpp and RcppArmadillo include paths. > > If you don

[Rcpp-devel] Rcpp modules take 3, now with a vignette

2010-05-27 Thread Romain Francois
Hello, I've made a quick (5 pages) vignette about the current feature set of Rcpp modules. I've pushed the current version here: http://addictedtor.free.fr/misc/rcpp/Rcpp-modules.pdf The vignette is essentially a compilation of my last two emails about modules. Romain. BTW: The c++ code is