Re: [Rcpp-devel] Testing for existence of named components

2012-03-29 Thread Ulrich Bodenhofer
Thanks so much, Jonas and Dirk! I just tried it and it works great. Jonas' benchmarking results are awesome too. I hope our discussion will help many other people who will come across this issue some time. Cheers, Ulrich On 03/28/2012 05:07 PM, Dirk Eddelbuettel wrote: On 28 March 2012 at 16

Re: [Rcpp-devel] Testing for existence of named components

2012-03-28 Thread Ulrich Bodenhofer
ething else. I would actually be quite curious to learn more about how lists are implemented in Rcpp. Thanks and best regards, Ulrich If so, I wonder why this mechanism has not been On 03/28/2012 02:56 PM, Dirk Eddelbuettel wrote: On 28 March 2012 at 13:56, Ulrich Bodenhofer wrote: | My quest

[Rcpp-devel] Testing for existence of named components

2012-03-28 Thread Ulrich Bodenhofer
Hi, My question is the following: is there any way of checking in whether a component of an Rcpp list (or vector) with a given name exists in this list. If I simply try accessing a non-existing component, I get an "index out of bounds" error. Trying to catch a possible exception did not work

Re: [Rcpp-devel] Some questions regarding internals of Rcpp objects

2011-08-05 Thread Ulrich Bodenhofer
Dear Dirk, Thanks for your detailed comments! Regarding the first question: as I wrote, I was actually assuming that Rcpp would not make deep copies. [...] See this variant: R> fun<- cxxfunction(signature(mat="numeric"), plugin="Rcpp", body=' + Rcpp::NumericMatrix matC(mat); + Rcp

[Rcpp-devel] Some questions regarding internals of Rcpp objects

2011-08-05 Thread Ulrich Bodenhofer
Dear list members, I have started developing a package using the latest version of Rcpp just recently, so I am more or less an Rcpp newbie. Since I am not sufficiently proficient in advanced C++ (and admittedly too lazy too) to analyze the Rcpp source code, I have some questions regarding what