Re: [Rcpp-devel] Named vectors

2010-09-10 Thread Romain Francois
Le 09/09/10 23:14, Dirk Eddelbuettel a écrit : On 9 September 2010 at 14:05, Andrew Redd wrote: | Thank you all for the comments. They are very helpful as I'm just | trying to get on board with Rcpp. | | My next problem with this is compiling and linking to the library in | the package pomp. I

Re: [Rcpp-devel] Named vectors

2010-09-09 Thread Dirk Eddelbuettel
On 9 September 2010 at 14:05, Andrew Redd wrote: | Thank you all for the comments. They are very helpful as I'm just | trying to get on board with Rcpp. | | My next problem with this is compiling and linking to the library in | the package pomp. I'll include the whole file here and hope that it

Re: [Rcpp-devel] Named vectors

2010-09-09 Thread Andrew Redd
Thank you all for the comments. They are very helpful as I'm just trying to get on board with Rcpp. My next problem with this is compiling and linking to the library in the package pomp. I'll include the whole file here and hope that it does not offend anyone for being too big. -- librar

Re: [Rcpp-devel] Named vectors

2010-09-09 Thread Romain Francois
Le 09/09/10 18:09, Dirk Eddelbuettel a écrit : On 9 September 2010 at 08:52, Andrew Redd wrote: | What is the appropriate way to use/convert named vectors in C++ with | Rcpp. Basically I have a named vector of parameters that pass into | the function. I cannot be certain of their order, so wou

Re: [Rcpp-devel] Named vectors

2010-09-09 Thread Dirk Eddelbuettel
On 9 September 2010 at 08:52, Andrew Redd wrote: | What is the appropriate way to use/convert named vectors in C++ with | Rcpp.  Basically I have a named vector of parameters that pass into | the function.  I cannot be certain of their order, so would like to | extract them by name.  For those ini

Re: [Rcpp-devel] Named vectors

2010-09-09 Thread Andrew Redd
That is good to know, and if it were up to me I would be using lists or environments. Unfortunately, I'm working with writing compiled code for use with the pomp package that has the constraint that model parameters are only passed on as a named numeric vector. So a way to convert the named vector

Re: [Rcpp-devel] Named vectors

2010-09-09 Thread Dirk Eddelbuettel
Hi Andrew, On 9 September 2010 at 08:52, Andrew Redd wrote: | What is the appropriate way to use/convert named vectors in C++ with | Rcpp.  Basically I have a named vector of parameters that pass into | the function.  I cannot be certain of their order, so would like to | extract them by name.  F

[Rcpp-devel] Named vectors

2010-09-09 Thread Andrew Redd
What is the appropriate way to use/convert named vectors in C++ with Rcpp.  Basically I have a named vector of parameters that pass into the function.  I cannot be certain of their order, so would like to extract them by name.  For those initialized in C++ a std:map should work, but how do declare