Skip to content
Prev 3638 / 10988 Next

[Rcpp-devel] Testing for existence of named components

Thanks for your swift reply, Dirk! Wow, to be frank, that is not what I 
was expecting. In the meantime, I read Section 5.9.6 of "Writing R 
extensions" and I was stunned to see a solution there that is similar to 
the one you propose. I do not know R internals very well, but I cannot 
believe that accesses by names are implemented by tediously searching 
through all names sequentially. There must be some hash table behind, 
right? Otherwise, list accesses would be terribly slow. If all my 
assumptions are right, I wonder why the R API does not make this 
mechanism available.

May I add one more question: where can I find the definition of the List 
class and the implementation of its methods in the Rcpp package source 
code? I was looking for this, but got lost. Are you using the method 
described in Section 5.9.6 of "Writing R extensions" (which I doubt) or 
something 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: