[R] names in R list's

Witold E Wolski wewolski at gmail.com
Tue Sep 8 13:53:13 CEST 2015

Hi Jeff,

Indeed there was something about plain-text in the r-help posting
guide although I can't find it there anymore.

Is it still an requirement?

Jeff, thanks for you constructive contribution ;) . Glad that you know
about plain text mode in e-mails, beside doing some perl programming.
I forgot about both. Even the linux admin's I know use python and
thunderbird or some webmail nowadays not pine and perl, but I do not
much networking, so what do I know.

I think the question I am asking is legitimate. The access complexity
of datastructures is specified in the documentation in case of python
datastructures,  java collections or stl containers.
I guess this information is available for name access on R-list but I
just can't find it.


On 7 September 2015 at 16:37, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote:
> You puzzle me. Why does someone who cannot figure out how to post an email in plain text after so many messages on this mailing list get all worried about access time for string indexing?
> Environment objects have those properties. They do not solve all problems though, because they are rather heavyweight... you need a lot of lookups to pay for their overhead. R5 objects and the hash package both use them, but I have never found three need to use them. Yes, I do program in Perl so I know where you are coming from, but the vector-based name lookup used in R works quite effectively for data where the number of list items is short or where I plan to access every element as part of my data processing anyway.
> ---------------------------------------------------------------------------
> Jeff Newmiller                        The     .....       .....  Go Live...
> DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
>                                       Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
> On September 7, 2015 3:34:53 AM PDT, Witold E Wolski <wewolski at gmail.com> wrote:
>>What is the access time for R lists given a name of list element, is it
>>linear, log, or constant?
>>Than what are to rules for names in R-lists
>>That reusing names is possible makes me wonder.
>>tmp <- as.list(c(1,2,3,4))
>>names(tmp) = c("a","a","b","b")
>>What I am looking for is a standard R data structure which will allow
>>for fast and name lookup.

Witold Eryk Wolski

More information about the R-help mailing list