Re: [Rcpp-devel] RcppArmadillo installation issue

2012-07-10 Thread Vinh Nguyen
On Tue, Jul 10, 2012 at 9:26 AM, Dirk Eddelbuettel wrote: > It would help us somewhat if you could let us know which compiler that is, eg > which compiler gets called from the mpiCC wrapper ;-) > Don't know that myself. Asking admin now. > That said, it very much looks like an issue with g++ 4

[Rcpp-devel] RcppArmadillo installation issue

2012-07-10 Thread Vinh Nguyen
Dear list, I'm trying to install RcppArmadillo on my school's cluster (R version 2012-05-31 r59485). Was able to install Rcpp fine using install.packages. However, I get the following error for Rcpp: > install.packages("RcppArmadillo", lib="~/Rlib", dep=TRUE) trying URL 'http://cran.stat.ucla.e

[Rcpp-devel] pass an R list as an argument and accessing elements of a list

2010-10-07 Thread Vinh Nguyen
Dear Rcpp List, My goal is to write a generic C++ optimizing function (call it "optim" in this email) based on the Newton-Raphson algorithm.  I will be passing into the optimizing function 4 arguments: 1.  (pointer to) a function, "f1", to be optimized, 2.  an initial value/vector, 3.  the remaini

Re: [Rcpp-devel] RcppArmadillo questions

2010-06-10 Thread Vinh Nguyen
On Thu, Jun 10, 2010 at 11:00 AM, Dirk Eddelbuettel wrote: > > On 10 June 2010 at 10:35, Vinh Nguyen wrote: > | Thanks Dirk.  I've been using the package skeleton method, and added > | PKG_CXXFLAGS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::CxxFlags()" ) >

Re: [Rcpp-devel] RcppArmadillo questions

2010-06-10 Thread Vinh Nguyen
Thanks Dirk. I've been using the package skeleton method, and added PKG_CXXFLAGS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::CxxFlags()" ) $(shell Rscript -e "cat( '-I', system.file('include', package = 'RcppArmadillo'), sep = '' )" ) into the Makevars file per Romain's suggestion. RcppArmadillo:

[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
es and the package built without an error. Thanks. Vinh On Thu, May 27, 2010 at 8:05 AM, Vinh Nguyen wrote: > 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

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 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

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 pack

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 o

[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);