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

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

Re: [Rcpp-devel] basic usage help

2010-05-26 Thread Romain Francois
Le 27/05/10 05:07, Vinh Nguyen a écrit : On Wed, May 26, 2010 at 6:31 PM, Davor Cubranic wrote: On 2010-05-26, at 4:08 PM, Vinh Nguyen wrote: Also, I didn't include BLAS or LAPACK linking -- still don't know how to get the compilation flags easily. I read the skeleton stuff but I don't under

Re: [Rcpp-devel] basic usage help

2010-05-26 Thread Vinh Nguyen
On Wed, May 26, 2010 at 6:31 PM, Davor Cubranic wrote: > On 2010-05-26, at 4:08 PM, Vinh Nguyen wrote: >> Also, I didn't include BLAS or LAPACK linking -- still don't know how >> to get the compilation flags easily.   I read the skeleton stuff but I >> don't understand (sorry). > > Just put in you

Re: [Rcpp-devel] basic usage help

2010-05-26 Thread Davor Cubranic
On 2010-05-26, at 4:08 PM, Vinh Nguyen wrote: > Also, I didn't include BLAS or LAPACK linking -- still don't know how > to get the compilation flags easily. I read the skeleton stuff but I > don't understand (sorry). Just put in your package's 'src' directory the Makevars file that's generated

Re: [Rcpp-devel] basic usage help

2010-05-26 Thread Vinh Nguyen
On Wed, May 26, 2010 at 11:29 AM, Vinh Nguyen wrote: >>> 6.  How do I compile the .cpp file on the >>> command line?  I got the following based on Dirk's HPC talk but >>> getting errors on my mac os x: >> >> The easiest way by far is to make a package and follow the guidelines of our >> last relea

Re: [Rcpp-devel] basic usage help

2010-05-26 Thread Vinh Nguyen
On Wed, May 26, 2010 at 10:21 AM, Romain Francois wrote: > Le 26/05/10 18:55, Vinh Nguyen a écrit : >> >> Dear Rcpp list, >> >> It's time for me to finally try out Rcpp > > Great. You won't regret it ;-) > Thanks for the prompt response. My only initial hesitation about using Rcpp is the uncerta

Re: [Rcpp-devel] basic usage help

2010-05-26 Thread Romain Francois
Le 26/05/10 18:55, Vinh Nguyen a écrit : Dear Rcpp list, It's time for me to finally try out Rcpp Great. You won't regret it ;-) since I have to do some computing for my research. Some questions (please be kind as I'm only a beginner C programmer using .C() and not smart enough to understa

[Rcpp-devel] basic usage help

2010-05-26 Thread Vinh Nguyen
Dear Rcpp list, It's time for me to finally try out Rcpp since I have to do some computing for my research. Some questions (please be kind as I'm only a beginner C programmer using .C() and not smart enough to understand . Call()): 1. I plan to use objects like Rcpp::NumericMatrix orig(matrix);