[R] Which data structure in R can mimic hash in PERL best?

Duncan Temple Lang duncan at wald.ucdavis.edu
Sat Nov 15 17:25:42 CET 2008


You could use

   new.env(hash = TRUE, emptyenv())

and you can even specify an initial size.

Seth Falcon has a package named dict that allows
for different choices of hash function.

   D.


Leon Yee wrote:
> Dear all,
> 
>     Which data structure in R can mimic hash in PERL? I'd like to set up
> a lookup table, which could be accomplished by HASH if using PERL. Which
> of the data structures in R is the most efficient for lookup table?
> Thanks for your help.
> 
> Best regards,
> Leon
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list