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
Leon Yee wrote:
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.
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
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
}
invisible(val)
}
clear.h - function(dict) {
rm(list=keys.h(dict), envir=dict)
}
#---
--
View this message in context:
http://www.nabble.com/Which-data-structure-in-R-can-mimic-hash-in-PERL-best--tp20515707p20517058.html
Sent from
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.
Best regards,
Leon
Duncan Temple Lang wrote:
Hans W. Borchers wrote:
Below I enclose a solution that I have written some month ago. It is
given in pythonic language, but you can easily translate it into the
corresponding Perl terms. One drawback is that one cannot use numbers
as keys, only keys following the
7 matches
Mail list logo