Hi,
Hans W. Borchers 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.
The regular answer to this is "named arrays/vectors" or "environments"
and has been given several times here on R-help. Unfortunately,
everybody is applying a different terminology such as 'maps', 'hashes',
'tables' or 'dictionaries', etc., so it's difficult to search for those
entries.
Thank you all for the help. Actually, I just used named vectors to
solve my problem. I am not sure whether there is some difference in
efficiency when comparing named vectors/arrays and environments.
Best wishes!
Leon
______________________________________________
R-help@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.